简体   繁体   中英

Ruby Version and Ruby Environment Mismatch

Im having some issues where my gems are being referenced from the incorrect directory for a specific version of Ruby. I have created an rvm gemset for ruby-1.8.7-p374, but installing gems puts them in the directory for ruby-1.9.3-p392.

$ rvm current

ruby-1.8.7-p374

$ gem environment

RubyGems Environment:
- RUBYGEMS VERSION: 2.0.5
- RUBY VERSION: 1.9.3 (2013-02-22 patchlevel 392) [x86_64-darwin11.4.2]
- INSTALLATION DIRECTORY: /Users/jason/.rvm/gems/ruby-1.9.3-p392
- RUBY EXECUTABLE: /Users/jason/.rvm/rubies/ruby-1.9.3-p392/bin/ruby
- EXECUTABLE DIRECTORY: /Users/jason/.rvm/gems/ruby-1.9.3-p392/bin
- RUBYGEMS PLATFORMS:
   - ruby
   - x86_64-darwin-11
- GEM PATHS:
   - /Users/jason/.rvm/gems/ruby-1.9.3-p392
   - /Users/jason/.rvm/gems/ruby-1.9.3-p392@global
- GEM CONFIGURATION:
   - :update_sources => true
   - :verbose => true
   - :backtrace => false
   - :bulk_threshold => 1000
   - "gem" => "--no-rdoc --no-ri"
- REMOTE SOURCES:
   - https://rubygems.org/

$rvm gemdir

/Users/jason/.rvm/gems/ruby-1.9.3-p392

It is possible that your shell configuration for GEM_PATH / GEM_HOME is out of sync with PATH , to fix it simply run:

rvm use ruby-1.9.3-p392

OR:

rvm use ruby-1.8.7-p374

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM