Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Could not find 'multi_json' (~> 1.0) #1580

Closed
exalted opened this Issue Nov 12, 2013 · 8 comments

Comments

Projects
None yet
3 participants

exalted commented Nov 12, 2013

Installed CocoaPods on OS X 10.9 (13A603) with…

sudo gem install cocoapods

… using System Ruby:

sudo ruby -v
ruby 2.0.0p247 (2013-06-27 revision 41674) [universal.x86_64-darwin13]

When asked for overwriting rake binary in /usr/bin/rake I confirmed with ‘y’.

At this point trying…

pod setup

… for the first time, but the following comes up:

/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/dependency.rb:296:in `to_specs': Could not find 'multi_json' (~> 1.0) among 16 total gem(s) (Gem::LoadError)
    from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/specification.rb:1196:in `block in activate_dependencies'
    from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/specification.rb:1185:in `each'
    from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/specification.rb:1185:in `activate_dependencies'
    from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/specification.rb:1167:in `activate'
    from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/specification.rb:1199:in `block in activate_dependencies'
    from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/specification.rb:1185:in `each'
    from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/specification.rb:1185:in `activate_dependencies'
    from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/specification.rb:1167:in `activate'
    from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/specification.rb:1199:in `block in activate_dependencies'
    from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/specification.rb:1185:in `each'
    from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/specification.rb:1185:in `activate_dependencies'
    from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/specification.rb:1167:in `activate'
    from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_gem.rb:48:in `gem'
    from /usr/bin/pod:22:in `<main>

Any ideas, please?

Thank you.

exalted commented Nov 12, 2013

For some reason, I had to…

sudo gem update multi_json
sudo gem install colored

I am, by no means, an expert on the subject, but shouldn’t these get installed/updated during sudo gem install cocoapods?

Now pod setup seems to work.

Owner

alloy commented Nov 12, 2013

They should indeed get auto-installed. Are you using an updated 10.8 system by any chance and were you using these gems (or CocoaPods) on that 10.8 system?

exalted commented Nov 12, 2013

@alloy I was, indeed, using 10.8 previous to 10.9. (without CocoaPods though) So, do you think is it okay to manually install/update whatever is old/missing in that case?

exalted commented Feb 27, 2014

If there are no further comments on this issue, I guess, I would rather go ahead and close it. Any thoughts?

Contributor

kylef commented Mar 11, 2014

I don't think this is a bug in CocoaPods, but instead a bug in either RubyGems or OS X's setup of Ruby/Gems.

My installation doesn't appear to expose 1.8 gems to ruby 2.0.0, thus it would re-install it as 2.0.0.

@exalted could you run gem env and show the output to see if it includes the old 1.8 directories.

$ gem env
RubyGems Environment:
  - RUBYGEMS VERSION: 2.0.3
  - RUBY VERSION: 2.0.0 (2013-06-27 patchlevel 247) [universal.x86_64-darwin13]
  - INSTALLATION DIRECTORY: /Users/kylef/gems
  - RUBY EXECUTABLE: /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby
  - EXECUTABLE DIRECTORY: /Users/kylef/gems/bin
  - RUBYGEMS PLATFORMS:
    - ruby
    - universal-darwin-13
  - GEM PATHS:
     - /Users/kylef/gems
     - /Users/kylef/.gem/ruby/2.0.0
     - /Library/Ruby/Gems/2.0.0
     - /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/gems/2.0.0
  - GEM CONFIGURATION:
     - :update_sources => true
     - :verbose => true
     - :backtrace => false
     - :bulk_threshold => 1000
  - REMOTE SOURCES:
     - https://rubygems.org/

exalted commented Mar 12, 2014

RubyGems Environment:
  - RUBYGEMS VERSION: 2.0.3
  - RUBY VERSION: 2.0.0 (2013-06-27 patchlevel 247) [universal.x86_64-darwin13]
  - INSTALLATION DIRECTORY: /Library/Ruby/Gems/2.0.0
  - RUBY EXECUTABLE: /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby
  - EXECUTABLE DIRECTORY: /usr/bin
  - RUBYGEMS PLATFORMS:
    - ruby
    - universal-darwin-13
  - GEM PATHS:
     - /Library/Ruby/Gems/2.0.0
     - /Library/Ruby/Gems/1.8
     - /usr/local/Cellar/rbenv-gem-rehash/1.0.0
  - GEM CONFIGURATION:
     - :update_sources => true
     - :verbose => true
     - :backtrace => false
     - :bulk_threshold => 1000
  - REMOTE SOURCES:
     - https://rubygems.org/

exalted commented Mar 12, 2014

@kylef I don't know why your output refers to your $HOME. It doesn't feel right to me.

Contributor

kylef commented Mar 12, 2014

@exalted This is because i've set my GEM_HOME to include this path. Since I want to install gems into my user and not system-wide (as mentioned in the installation guide for CocoaPods).

$ env
GEM_HOME=/Users/kylef/gems
PATH=/Users/kylef/gems/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin

Looks like you have custom paths to include /Library/Ruby/Gems/1.8 in either $GEM_PATH or ~/.gemrc. I'd check these and update them.

Since this is a configuration problem with ruby/gems and not a problem with CocoaPod's itself I'm going to close. If what I said doesn't work please consult Stack Overflow or an equivalent forum for discussion instead of the CocoaPod's issue tracker.

@kylef kylef closed this Mar 12, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment