4

I have searched everywhere, the problem seems similar, but it is not. I was working using pod and needed to update it. Once I issued sudo gem update there were so many errors, but cocoa pod got update to the latest. Now where I run pod with any option I get the following errors:

Last login: Mon Apr 21 03:48:44 on ttys000
mdhossain@Mds-MacBook-Pro ~ $ pod --version
/Library/Ruby/Site/2.0.0/rubygems/ext/builder.rb:212:in `initialize': Permission denied - /Library/Ruby/Gems/2.0.0/extensions/universal-darwin-13/2.0.0/json-1.8.1/gem_make.out (Errno::EACCES)
    from /Library/Ruby/Site/2.0.0/rubygems/ext/builder.rb:212:in `open'
    from /Library/Ruby/Site/2.0.0/rubygems/ext/builder.rb:212:in `write_gem_make_out'
    from /Library/Ruby/Site/2.0.0/rubygems/ext/builder.rb:132:in `build_error'
    from /Library/Ruby/Site/2.0.0/rubygems/ext/builder.rb:171:in `rescue in build_extension'
    from /Library/Ruby/Site/2.0.0/rubygems/ext/builder.rb:156:in `build_extension'
    from /Library/Ruby/Site/2.0.0/rubygems/ext/builder.rb:198:in `block in build_extensions'
    from /Library/Ruby/Site/2.0.0/rubygems/ext/builder.rb:195:in `each'
    from /Library/Ruby/Site/2.0.0/rubygems/ext/builder.rb:195:in `build_extensions'
    from /Library/Ruby/Site/2.0.0/rubygems/specification.rb:1436:in `block in build_extensions'
    from /Library/Ruby/Site/2.0.0/rubygems/user_interaction.rb:45:in `use_ui'
    from /Library/Ruby/Site/2.0.0/rubygems/specification.rb:1434:in `build_extensions'
    from /Library/Ruby/Site/2.0.0/rubygems/stub_specification.rb:60:in `build_extensions'
    from /Library/Ruby/Site/2.0.0/rubygems/basic_specification.rb:56:in `contains_requirable_file?'
    from /Library/Ruby/Site/2.0.0/rubygems/specification.rb:925:in `block in find_inactive_by_path'
    from /Library/Ruby/Site/2.0.0/rubygems/specification.rb:924:in `each'
    from /Library/Ruby/Site/2.0.0/rubygems/specification.rb:924:in `find'
    from /Library/Ruby/Site/2.0.0/rubygems/specification.rb:924:in `find_inactive_by_path'
    from /Library/Ruby/Site/2.0.0/rubygems.rb:185:in `try_activate'
    from /Library/Ruby/Site/2.0.0/rubygems/core_ext/kernel_require.rb:132:in `rescue in require'
    from /Library/Ruby/Site/2.0.0/rubygems/core_ext/kernel_require.rb:144:in `require'
    from /Library/Ruby/Gems/2.0.0/gems/xcodeproj-0.16.1/lib/xcodeproj/ext.rb:4:in `<top (required)>'
    from /Library/Ruby/Site/2.0.0/rubygems/core_ext/kernel_require.rb:73:in `require'
    from /Library/Ruby/Site/2.0.0/rubygems/core_ext/kernel_require.rb:73:in `require'
    from /Library/Ruby/Gems/2.0.0/gems/xcodeproj-0.16.1/lib/xcodeproj.rb:30:in `<top (required)>'
    from /Library/Ruby/Site/2.0.0/rubygems/core_ext/kernel_require.rb:73:in `require'
    from /Library/Ruby/Site/2.0.0/rubygems/core_ext/kernel_require.rb:73:in `require'
    from /Library/Ruby/Gems/2.0.0/gems/cocoapods-0.32.1/lib/cocoapods.rb:2:in `<top (required)>'
    from /Library/Ruby/Site/2.0.0/rubygems/core_ext/kernel_require.rb:73:in `require'
    from /Library/Ruby/Site/2.0.0/rubygems/core_ext/kernel_require.rb:73:in `require'
    from /Library/Ruby/Gems/2.0.0/gems/cocoapods-0.32.1/bin/pod:32:in `<top (required)>'
    from /usr/bin/pod:23:in `load'
    from /usr/bin/pod:23:in `<main>'
mdhossain@Mds-MacBook-Pro ~ $ 

I am not sure why this is happening. I have reinstalled cocoapod and yet this did not solve the problem. Help you be much appreciated.

animuson
  • 53,861
  • 28
  • 137
  • 147
mdzahedhossain
  • 125
  • 1
  • 14

2 Answers2

2

I has the same issue when I updated to Yosemite. I sort out by updating gem packages, using...

$ sudo gem update

After updating $pod update or $pod install worked fine for me.

Baig
  • 4,737
  • 1
  • 32
  • 47
0

I had the same issue when I update to Yosemite Beta 2.

I solved my problem by running xcode-select --install in my terminal. That will install/update rubygems.

Once the update is done, I had to launch pod update twice to see the result. But that's works for me.

Steven
  • 1,088
  • 1
  • 8
  • 16
  • This did not work for me. I used a lot from this following thread: http://stackoverflow.com/questions/24018355/cocoapods-with-xcode-6-and-10-10-yosemite – mdzahedhossain Oct 23 '14 at 23:27