Gem environment has wrong ruby version

Hi all,

This appears to be wrong, I'm not sure how to fix it.
Here's my output from "gem environment"

RubyGems Environment:
  - RUBYGEMS VERSION: 1.3.7
  - RUBY VERSION: 1.8.7 (2010-01-10 patchlevel 249) [x86_64-linux]
  - INSTALLATION DIRECTORY: /usr/lib/ruby/gems/1.8
  - RUBY EXECUTABLE: /usr/bin/ruby1.8
  - EXECUTABLE DIRECTORY: /usr/bin
  - RUBYGEMS PLATFORMS:
    - ruby
    - x86_64-linux
  - GEM PATHS:
     - /usr/lib/ruby/gems/1.8
     - /home/ed/.gem/ruby/1.8
  - GEM CONFIGURATION:
     - :update_sources => true
     - :verbose => true
     - :benchmark => false
     - :backtrace => false
     - :bulk_threshold => 1000
  - REMOTE SOURCES:
     - http://rubygems.org/

And here's "ruby -v"

ruby 1.9.1p0 (2009-01-30 revision 21907) [x86_64-linux]

So gem has the wrong version of ruby in the environment. I suspect this
may be the reason of some weird errors I've been seeing. So how do I
change the gem environment?

Thanks,
Eddie

You need to install gem (and all your gems) again, under the new ruby. Each ruby gets its own gems, stored in its own version tree.

Walter

Great, that worked! Thank you

On a side note I believe ruby 1.9.1 does not work well with Rails (at
least Rails 3, don't know about 2). The recommendation is to use
1.9.2.

Colin

Hello,

I read it, aslo it worked. But still think using RVM is much better
solution, later you won't have headache, and you can use more then 1
Ruby+Rails+Gem versions on same system.

http://rvm.beginrescueend.com/

Good luck
Zoltán