gpt4 book ai didi

ruby-on-rails - Rails 4.0.0,Gemfile 需要 rake 10.1.0 for Rake

转载 作者:行者123 更新时间:2023-12-05 01:05:39 25 4
gpt4 key购买 nike

我目前正在运行 Rails 4.0.0,ruby 1.9.3p392(2013-02-22 修订版 39386)[x86_64-darwin10.8.0],使用 Rake 10.1.1

我正在为 Rails 中的一个类开发一个应用程序,当我去运行 rake DB 迁移时,我收到了以下错误消息:

Joses-MacBook-Air:crumblr JRV$ rake db:migrate
rake aborted!
You have already activated rake 10.1.1, but your Gemfile requires rake 10.1.0. Using bundle exec may solve this.
/usr/local/rvm/gems/ruby-1.9.3-p392/gems/bundler-1.3.5/lib/bundler/runtime.rb:33:in `block in setup'
/usr/local/rvm/gems/ruby-1.9.3-p392/gems/bundler-1.3.5/lib/bundler/runtime.rb:19:in `setup'
/usr/local/rvm/gems/ruby-1.9.3-p392/gems/bundler-1.3.5/lib/bundler.rb:120:in `setup'
/usr/local/rvm/gems/ruby-1.9.3-p392/gems/bundler-1.3.5/lib/bundler/setup.rb:7:in `<top (required)>'
/Users/JRV/crumblr/config/boot.rb:4:in `<top (required)>'
/Users/JRV/crumblr/config/application.rb:1:in `<top (required)>'
/Users/JRV/crumblr/Rakefile:4:in `<top (required)>'
(See full trace by running task with --trace)

恢复或覆盖此问题以允许迁移的解决方案是什么。

最佳答案

就像它建议的那样,你可以做 bundle exec rake db:migrate
对于不需要添加前缀的解决方案,请尝试执行 bundle update rake

关于ruby-on-rails - Rails 4.0.0,Gemfile 需要 rake 10.1.0 for Rake,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21220371/

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