tags:

views:

42

answers:

1

RubyGems is reporting a different ruby version than running ruby --version. Looking for suggestions on diagnosing and fixing this. OS is OS X 10.5.

lando-macbook:rubygems-1.3.7 lando$ gem env
RubyGems Environment:
  - RUBYGEMS VERSION: 1.3.7
  - RUBY VERSION: 1.8.6 (2009-06-08 patchlevel 369) [universal-darwin9.0]
  - INSTALLATION DIRECTORY: /Library/Ruby/Gems/1.8
  - RUBY EXECUTABLE: /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby
  - EXECUTABLE DIRECTORY: /usr/bin
  - RUBYGEMS PLATFORMS:
    - ruby
    - universal-darwin-9
  - GEM PATHS:
     - /Library/Ruby/Gems/1.8
     - /Users/lkuhn/.gem/ruby/1.8
     - /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8
  - GEM CONFIGURATION:
     - :update_sources => true
     - :verbose => true
     - :benchmark => false
     - :backtrace => false
     - :bulk_threshold => 1000
  - REMOTE SOURCES:
     - http://rubygems.org/

lando-macbook:rubygems-1.3.7 lando$ ruby --version
ruby 1.8.7 (2010-08-16 patchlevel 302) [i686-darwin9]

lando-macbook:rubygems-1.3.7 lando$ which ruby
/opt/local/bin/ruby
A: 

The problem is that you have a ruby executable in /opt/local/bin that was probably installed by macports at some point. Either deleting this ruby executable or removing /opt/local/bin from your PATH variable should solve your problem. gems is telling you exactly where it expects to find ruby and its associated executables:

RUBY EXECUTABLE: /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby
  - EXECUTABLE DIRECTORY: /usr/bin
ennuikiller
The version in /opt/local/bin is the more recent version that I need to be using. I used macpoo because I did not not know how to update the version in /System/... How do i update that version?
landon9720
Updating your system version may be advised against since some mac-specific utilities could depend on version x being there...
ChristopheD