[英]How to change/update a gem path route in Rails
When I run rake db:migrate
, I get an error message that has this line in it: 当我运行
rake db:migrate
,我收到一条包含以下内容的错误消息:
/Users/andy/.rvm/gems/ruby-2.5.0@global/gems/rake-12.3.0/exe/rake:27:in `<top (required)>
but when query the path route I get a different route: 但是当查询路径路线时,我得到了不同的路线:
Unkle-Andy:workspace andy$ gem which rake
/Users/andy/.rvm/gems/ruby-2.5.0/gems/rake-12.3.0/lib/rake.rb
Looking for a way to change/update the path route so that when I run the rake gem it looks for it in /lib
instead of /exe
. 寻找改变/更新路径路线的方法,以便当我运行rake gem时,它在
/lib
而不是/exe
寻找它。 Or is this normal? 还是正常?
Just installed Ruby on Rails on my computer. 刚在我的计算机上安装了Ruby on Rails。 I am running Ruby 2.5.0, Rails 5.1.4, and rake 12.3.0 on an Apple computer.
我在Apple计算机上运行Ruby 2.5.0,Rails 5.1.4和rake 12.3.0。 I just uninstalled and reinstalled the Rake gem and am still getting the same mistake
我刚刚卸载并重新安装了Rake gem,仍然遇到相同的错误
The lib
part of path that gem which rake
shows is normal; gem which rake
显示的gem which rake
的路径的lib
部分是正常的; it's what before it most likely causes problems - this path and path shown in error message point to two different directories, containing different RVM gemsets. 这是最有可能导致问题的原因-此路径和错误消息中显示的路径指向两个不同的目录,其中包含不同的RVM gemset。 Try resetting your current gemset:
尝试重置当前的宝石集:
rvm gemset use default
or rvm gemset use global
rvm gemset use default
或rvm gemset use global
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.