简体   繁体   中英

GEM_PATH is looking in /usr/local/rvm/gems, which has been deleted

I messed up my development environment while working on my rails app, so I attempted to completely remove rvm, rails and ruby from my system so I could start fresh. I then installed rbenv, ruby and rails.

Now I am getting the following error when i try to use the rails s command:

/usr/lib/ruby/2.3.0/rubygems/dependency.rb:319:in `to_specs': Could not find 'railties' (>= 0.a) among 5 total gem(s) (Gem::LoadError)
Checked in 'GEM_PATH=/usr/local/rvm/gems/ruby-2.3.0:/usr/local/rvm/gems/ruby-2.3.0@global', execute `gem env` for more information
from /usr/lib/ruby/2.3.0/rubygems/dependency.rb:328:in `to_spec'
from /usr/lib/ruby/2.3.0/rubygems/core_ext/kernel_gem.rb:65:in `gem'
from /usr/local/bin/rails:22:in `<main>'

I am assuming this is because I removed the 'usr/local/rvm' folder, but it is still trying to look there. I'm thinking I need to change the GEM_PATH, but I'm not sure how. If anyone can help me, that would be great, I am totally lost.

I resolve the problem reinstalling rails, I belive that my RVM was confuse, anyway first try to config your terminal ubuntu first and next reinstall

$ gem install rails

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