Gem environment switched from Ruby 1.8.7 back to system loaded Ruby 1.8.6
So, I am relatively new to unix and Ruby on Rails. I'm currently working on the Ruby on Rails Tutorial. I'm using OS 10.5.8. I had installed Ruby 1.8.7 and RubyGems 1.3.5 into /usr/local/bin/ and had installed Git as well. Everything was working fine and I was charging ahead.
Then I ended a shell session, came back to it and the whole RubyGem prefix and executable changed to the system installed: /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby and started running Ruby 1.8.6 and RubyGems 1.0.1.
What happened? How do I get back to my original path to the Ruby 1.8.7 and RubyGem 1.3.5. Or should I just try and upgrade the existing path to Ruby 1.8.7, etc.? Could rvm help this problem and how?
My path looks like: /usr/local/git/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin:/usr/local/git/bin
And my gem environment is:
RubyGems Environment:
- RUBYGEMS VERSION: 1.0.1 (1.0.1) - RUBY VERSION: 1.8.6 (2009-06-08
patchlevel 369) [universal-darwin9.0] - INSTALLATION DIRECTORY:
/Library/Ruby/Gems/1.8 - RUBYGEMS PREFIX:
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby
- RUBY EXECUTABLE:
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby
- RUBYGEMS PLATFORMS:
- ruby
- universal-darwin-9
- GEM PATHS:
- /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8
- /Library/Ruby/Gems/1.8
- GEM CONFIGURATION:
- :update_sources => true
- :verbose => true
- :benchmark => false
- :backtrace => false
- :bulk_threshold => 1000
- REMOTE SOURCES:
Support Staff 2 Posted by Nick Quaranto on 27 Feb, 2011 06:22 PM
Not sure what's going on with your system, but I definitely advise you to install/use RVM, which will actually work without a lot of manual finagling:
http://rvm.beginrescueend.com/