ruby-on-rails – 耙子或任何其他耙子命令无法正常工作

前端之家收集整理的这篇文章主要介绍了ruby-on-rails – 耙子或任何其他耙子命令无法正常工作前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
嗨,我正在做一些编码,并尝试
rake routes

这个错误信息出来了,我不知道该怎么办

rake aborted!
Gem::LoadError: You have already activated rake 10.4.2,but your Gemfile requires rake 10.4.0. Prepending `bundle exec` to your command may solve this.

/home/simplybel/.rvm/gems/ruby-2.1.2@global/gems/bundler-1.7.4/lib/bundler/runtime.rb:34:in `block in setup'
/home/simplybel/.rvm/gems/ruby-2.1.2@global/gems/bundler-1.7.4/lib/bundler/runtime.rb:19:in `setup'
/home/simplybel/.rvm/gems/ruby-2.1.2@global/gems/bundler-1.7.4/lib/bundler.rb:121:in `setup'
/home/simplybel/.rvm/gems/ruby-2.1.2@global/gems/bundler-1.7.4/lib/bundler/setup.rb:7:in `<top (required)>'
/home/simplybel/projects/gamification/config/boot.rb:4:in `<top (required)>'
/home/simplybel/projects/gamification/config/application.rb:1:in `<top (required)>'
/home/simplybel/projects/gamification/Rakefile:4:in `<top (required)>'
LoadError: cannot load such file -- bundler/setup
/home/simplybel/projects/gamification/config/boot.rb:4:in `<top (required)>'
/home/simplybel/projects/gamification/config/application.rb:1:in `<top (required)>'
/home/simplybel/projects/gamification/Rakefile:4:in `<top (required)>'
(See full trace by running task with --trace)

任何帮助这将真的不胜感激

解决方法

运行命令rails new MyNewProject后,我在旧项目中遇到了这个问题

要修复它的旧项目,我刚刚进入Gemfile.lock文件搜索耙子.我发现了耙子(10.3.2),并用耙子(10.4.2)代替它,并为它修复.

原文链接:https://www.f2er.com/ruby/273460.html

猜你在找的Ruby相关文章