Gem environment switched from Ruby 1.8.7 back to system loaded Ruby 1.8.6

Dave Seel's Avatar

Dave Seel

25 Feb, 2011 01:25 PM

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:
  1. Support Staff 1 Posted by Nick Quaranto on 27 Feb, 2011 06:22 PM

    Nick Quaranto's Avatar

    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/

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac