简体   繁体   English

GEM_PATH在/ usr / local / rvm / gems中查找,该文件已被删除

[英]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. 在使用Rails应用程序时,我搞砸了开发环境,因此尝试从系统中完全删除rvm,rails和ruby,以便重新开始。 I then installed rbenv, ruby and rails. 然后,我安装了rbenv,ruby和rails。

Now I am getting the following error when i try to use the rails s command: 现在,当我尝试使用rails s命令时出现以下错误:

/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. 我以为这是因为我删除了'usr / local / rvm'文件夹,但它仍在尝试查找。 I'm thinking I need to change the GEM_PATH, but I'm not sure how. 我以为我需要更改GEM_PATH,但不确定如何。 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 我解决了重新安装rails的问题,我相信我的RVM令人困惑,无论如何先尝试首先配置您的终端ubuntu ,然后再重新安装

$ gem install rails $ gem安装导轨

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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