Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can't install cocoapods, report on pod setup

I was following this tutorial http://www.raywenderlich.com/64546/introduction-to-cocoapods-2 to install cocoapods on my MacBook (Mavericks 10.9.5).

I have successfully used this commands

sudo gem update --system
sudo gem install cocoapods

But then whenever i use pod setup i get this log

/Users/tommy/.rvm/gems/ruby-2.1.1@msf/gems/xcodeproj-0.19.3/lib/xcodeproj/plist_helper.rb:140:in `<module:CoreFoundation>': uninitialized constant Fiddle::NULL (NameError)
    from /Users/tommy/.rvm/gems/ruby-2.1.1@msf/gems/xcodeproj-0.19.3/lib/xcodeproj/plist_helper.rb:70:in `<top (required)>'
    from /usr/local/Cellar/ruby193/1.9.3-p545/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:69:in `require'
    from /usr/local/Cellar/ruby193/1.9.3-p545/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:69:in `require'
    from /Users/tommy/.rvm/gems/ruby-2.1.1@msf/gems/xcodeproj-0.19.3/lib/xcodeproj/ext.rb:2:in `<top (required)>'
    from /usr/local/Cellar/ruby193/1.9.3-p545/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:69:in `require'
    from /usr/local/Cellar/ruby193/1.9.3-p545/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:69:in `require'
    from /Users/tommy/.rvm/gems/ruby-2.1.1@msf/gems/xcodeproj-0.19.3/lib/xcodeproj.rb:25:in `<top (required)>'
    from /usr/local/Cellar/ruby193/1.9.3-p545/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:69:in `require'
    from /usr/local/Cellar/ruby193/1.9.3-p545/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:69:in `require'
    from /Users/tommy/.rvm/gems/ruby-2.1.1@msf/gems/cocoapods-0.34.2/lib/cocoapods.rb:2:in `<top (required)>'
    from /usr/local/Cellar/ruby193/1.9.3-p545/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:69:in `require'
    from /usr/local/Cellar/ruby193/1.9.3-p545/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:69:in `require'
    from /Users/tommy/.rvm/gems/ruby-2.1.1@msf/gems/cocoapods-0.34.2/bin/pod:32:in `<top (required)>'
    from /Users/tommy/.rvm/gems/ruby-2.1.1@msf/bin/pod:23:in `load'
    from /Users/tommy/.rvm/gems/ruby-2.1.1@msf/bin/pod:23:in `<main>'

It appears also if i type pod install.

What should I do? Thanks in advance

like image 391
r4id4 Avatar asked Oct 09 '14 08:10

r4id4


People also ask

How do I install CocoaPods?

There is two way to install cocoapods by using homebrew & gem. If you had install cocoapods using gem run following. If you forgot which one you used earlier, please execute both commands. Please make sure all cocoapods instances are removed to check run pod --version.

How to update CocoaPods to a newer version?

Use pod update [PODNAME] only when you want to update pods to a newer version. Note: the vocabulary of install vs. update is not actually specific to CocoaPods.

Why doesn’t the installed CocoaPods GEM work anymore?

After upgrading from macOS 10.8 to 10.9 the installed CocoaPods gem doesn’t work anymore, even after re-installing the gem. To solve this, you might need to uninstall the gem first and then re-install.

How do I add pods to my project?

Use pod install to install new pods in your project. Even if you already have a Podfile and ran pod install before; so even if you are just adding/removing pods to a project already using CocoaPods. Use pod update


1 Answers

The latest version of cocoapods gem (v0.34.2) requires a version of xcodeproj gem >= 0.19.2. But the latest version of xcodeproj gem (0.19.3) causes this issue.

Managed to fix this by fixing the xcodeproj version to 0.19.2.

gem uninstall xcodeproj
gem install xcodeproj -v 0.19.2

or specify gem 'xcodeproj', '0.19.2' in your gemfile, then run bundle.

like image 80
odlp Avatar answered Nov 05 '22 06:11

odlp