加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

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

发布时间:2020-12-16 20:28:39 所属栏目:百科 来源:网络整理
导读:嗨,我正在做一些编码,并尝试 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./
嗨,我正在做一些编码,并尝试
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)代替它,并为它修复.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读