Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

very stuck with cocoapods / ruby setup

Tags:

cocoapods

This was working fine and then suddenly it wasn't. I wish i knew why. Really stuck and cannot find anything online. I'm working on an ObjectiveC project. I've tried reseting everything with:

$ sudo gem uninstall ruby
$ sudo gem uninstall cocoapods

then

$ sudo gem install ruby
$ sudo gem install cocoapods
$ sudo gem update ruby
$ sudo gem update cocoapods

then i when in my projects directory i run

$pod install 

and get the following error. I get this on all projects.

/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:110:in `require': cannot load such file -- cocoapods-core (LoadError)
    from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:110:in `rescue in require'
    from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:35:in `require'
    from /Library/Ruby/Gems/2.0.0/gems/cocoapods-0.29.0/lib/cocoapods.rb:8:in `<module:Pod>'
    from /Library/Ruby/Gems/2.0.0/gems/cocoapods-0.29.0/lib/cocoapods.rb:4:in `<top (required)>'
    from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:45:in `require'
    from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:45:in `require'
    from /Library/Ruby/Gems/2.0.0/gems/cocoapods-0.29.0/bin/pod:23:in `<top (required)>'
    from /usr/bin/pod:23:in `load'
    from /usr/bin/pod:23:in `<main>'

Any ideas/clues/answers would be very appreciated.

like image 667
user1691493 Avatar asked Jan 12 '14 08:01

user1691493


People also ask

How long does CocoaPods take to install?

This little change saved me more than 10 minutes. Executing "pod install" now takes less than 2 minutes, while before making this changes it took about 12 minutes.

Do I need Ruby to install CocoaPods?

Cocoapods is built on top of Ruby, so you would need to install that in your system before using Cocoapods.

Does CocoaPods use Ruby?

CocoaPods is built with Ruby and it will be installable with the default Ruby available on macOS. You can use a Ruby Version manager, however we recommend that you use the standard Ruby available on macOS unless you know what you're doing.


2 Answers

I reinstalled cocoa pods by running

$ sudo gem uninstall cocoapods-core cocoapods-downloader cocoapods
$ sudo gem install cocoapods

That resolved the issue for me

like image 167
der_michael Avatar answered Oct 08 '22 16:10

der_michael


Looks like you're missing one of CocoaPod's dependencies. You should be able to install it with:

[sudo] gem install cocoapods-core
like image 20
Keith Smiley Avatar answered Oct 08 '22 17:10

Keith Smiley