gpt4 book ai didi

ruby-on-rails - rake 中止!您已经激活了 rake 10.0.2,但是您的 Gemfile 需要 rake 0.9.2.2

转载 作者:行者123 更新时间:2023-12-03 10:17:45 30 4
gpt4 key购买 nike

我正在尝试执行“rake db:migrate”,它给了我这个错误。

Andy:AcademyAir Andy$ rake db:migrate
/Users/Andy/.rvm/gems/ruby-1.9.2-p290/gems/bundler-1.2.2/lib/bundler/runtime.rb:197: warning: Insecure world writable dir /usr in PATH, mode 040777
rake aborted!
You have already activated rake 10.0.2, but your Gemfile requires rake 0.9.2.2. Using bundle exec may solve this.
/Users/Andy/.rvm/gems/ruby-1.9.2-p290/gems/bundler-1.2.2/lib/bundler/runtime.rb:31:in `block in setup'
/Users/Andy/.rvm/gems/ruby-1.9.2-p290/gems/bundler-1.2.2/lib/bundler/runtime.rb:17:in `setup'
/Users/Andy/.rvm/gems/ruby-1.9.2-p290/gems/bundler-1.2.2/lib/bundler.rb:116:in `setup'
/Users/Andy/.rvm/gems/ruby-1.9.2-p290/gems/bundler-1.2.2/lib/bundler/setup.rb:7:in `<top (required)>'
/Users/Andy/Desktop/AcademyAir/config/boot.rb:6:in `<top (required)>'
/Users/Andy/Desktop/AcademyAir/config/application.rb:1:in `<top (required)>'
/Users/Andy/Desktop/AcademyAir/Rakefile:5:in `<top (required)>'
(See full trace by running task with --trace)

最佳答案

试试这个 bundle exec rake db:migrate
移除 rake 10.0.2 gem

通过使用 gem uninstall rake并删除 10.0.2 rake gem 的版本

然后尝试 rake db:migrate
为什么会出现错误 :在您的 gem 中列出了 rake gem 安装的两个版本(10.0.2 和 0.9.2.2),因此会出现此错误。*

另一个解决方案是你可以做 bundle update

关于ruby-on-rails - rake 中止!您已经激活了 rake 10.0.2,但是您的 Gemfile 需要 rake 0.9.2.2,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13489953/

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