简体   繁体   中英

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:

/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 . Or is this normal?

Just installed Ruby on Rails on my computer. I am running Ruby 2.5.0, Rails 5.1.4, and rake 12.3.0 on an Apple computer. I just uninstalled and reinstalled the Rake gem and am still getting the same mistake

The lib part of path that gem which rake shows is normal; 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. Try resetting your current gemset:

rvm gemset use default or rvm gemset use global

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