2

I've installed cocoapods like there

alex-z:~ alex-z$ /usr/bin/gem list --local | grep "cocoapods"

Result is empty

alex-z:~ alex-z$ sudo !!

Result is

cocoapods (0.33.1)
cocoapods-core (0.33.1)
cocoapods-downloader (0.6.1)
cocoapods-plugins (0.2.0)
cocoapods-trunk (0.1.4)
cocoapods-try (0.3.0)

And next

alex-z:~ alex-z$ /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/gem list --local | grep "cocoapods"
alex-z:~ alex-z$ sudo !!

Results are the same with results of previous commands

When I try to use pod I get error

alex-z:~ alex-z$ pod --version
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/dependency.rb:296:in `to_specs': Could not find 'cocoapods' (>= 0) among 87 total gem(s) (Gem::LoadError)
    from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/dependency.rb:307:in `to_spec'
    from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_gem.rb:47:in `gem'
    from /usr/bin/pod:22:in `<main>'

Has anyone else solved this issue?

Community
  • 1
  • 1
Alex Zaikin
  • 223
  • 3
  • 9
  • Not sure what's going on here but you may try installing ruby with [rbenv](https://github.com/sstephenson/rbenv) or [rvm](http://rvm.io/) – Keith Smiley Jul 18 '14 at 00:53

1 Answers1

1

I've had different versions of ruby in /usr/bin/ruby (2.0.0-p195) and /System/Library/Frameworks/.../ruby (2.0.0-p481). rvm upgrade 2.0.0-p195 2.0.0-p481 has helped me.

Alex Zaikin
  • 223
  • 3
  • 9