CocoaPods / search.cocoapods.org

This is the CocoaPods search engine repo, please direct CocoaPods issues to the main CocoaPods repository.
25 stars 11 forks source link

Cocoapods Installation is getting failed for ruby 1.9.3 #20

Closed sandeepgvn closed 11 years ago

sandeepgvn commented 11 years ago

I am not able to install cocoapods as I am getting the following error.

The installed version of X-Code is 4.6 and ruby is 1.9.3

Building native extensions. This could take a while... ERROR: Error installing cocoapods: ERROR: Failed to build gem native extension.

/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby extconf.rb mkmf.rb can't find header files for ruby at /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/ruby.h

Gem files will remain installed in /Library/Ruby/Gems/1.8/gems/xcodeproj-0.3.5 for inspection. Results logged to /Library/Ruby/Gems/1.8/gems/xcodeproj-0.3.5/ext/xcodeproj/gem_make.out

floere commented 11 years ago

Can you run ruby -v, please? It seems like it's using the system Ruby: "/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby"

(I'm just a first responder – apply here https://github.com/CocoaPods/CocoaPods for more in-depth help ;) )

sandeepgvn commented 11 years ago

@floere where do I need to run ruby -v? Do I need to run it directly in terminal ?

floere commented 11 years ago

That would be great, yes. Also run /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby -v which is used by your gem install, above.

sandeepgvn commented 11 years ago

@floere, just now I have ran the ruby -v command and it has returned the following

ruby 1.8.7 (2012-02-08 patchlevel 358) [universal-darwin12.0]

sandeepgvn commented 11 years ago

@floere, After running /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby -v I got this

ruby 1.8.7 (2012-02-08 patchlevel 358) [universal-darwin12.0]

floere commented 11 years ago

Thanks, @sandeepgvn. It looks like the Ruby that is used is not 1.9.3.

sandeepgvn commented 11 years ago

Okay, what should I do in this case ?

sandeepgvn commented 11 years ago

How do I get cocoapods installed in this case?

floere commented 11 years ago

See to it that Ruby 1.9.3 is in a preferred Position in $PATH, such that it is chosen first for executing ruby (and as a nice side effect gem).

sandeepgvn commented 11 years ago

@floere, How do I set the preferred position in $PATH for ruby? Please bare me, as I am new to this.. And I hope you will help me in fixing this.

floere commented 11 years ago

I can offer you this link here: http://www.tech-recipes.com/rx/2621/os_x_change_path_environment_variable/ Good luck!

sandeepgvn commented 11 years ago

Thanks for the help.. I will try it out.

floere commented 11 years ago

Have fun! I'll close this issue. If you encounter new problems, please open an issue over at the CocoaPods repo: https://github.com/CocoaPods/CocoaPods (this here is just the website).