gpt4 book ai didi

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

转载 作者:行者123 更新时间:2023-12-03 21:00:36 26 4
gpt4 key购买 nike

嗨,我正在做一些编码并试图

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 文件并搜索 rake .我找到的 rake (10.3.2)并将其替换为 rake (10.4.2)这为我修复了它。

关于ruby-on-rails - rake 或任何其他 rake 命令无法正常工作,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27296856/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com