Closed sandeepgvn closed 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 ;) )
@floere where do I need to run ruby -v? Do I need to run it directly in terminal ?
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.
@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]
@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]
Thanks, @sandeepgvn. It looks like the Ruby that is used is not 1.9.3.
Okay, what should I do in this case ?
How do I get cocoapods installed in this case?
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
).
@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.
I can offer you this link here: http://www.tech-recipes.com/rx/2621/os_x_change_path_environment_variable/ Good luck!
Thanks for the help.. I will try it out.
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).
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