gpt4 book ai didi

ruby - 在任何来源中都找不到 rake-0.8.7 (Bundler::GemNotFound)

转载 作者:太空宇宙 更新时间:2023-11-03 17:38:32 26 4
gpt4 key购买 nike

我使用的是 Ruby 1.8.7 和 Rails 2.3.5 版本。当我尝试启动服务器时,它会抛出以下错误。当我列出 gem 时,它显示了那里的 rake ,但版本不同

actionmailer (2.3.5)
actionpack (2.3.5)
activerecord (2.3.5)
activeresource (2.3.5)
activesupport (2.3.5)
bundler (1.1.3)
fattr (2.2.1)
git (1.2.5)
postgres-pr (0.6.3)
rack (1.0.1)
rails (2.3.5)
rake (0.9.2.2)
rush (0.6.8)
session (3.1.0)

请帮我解决这个问题。

D:/ruby/lib/ruby/gems/1.8/gems/bundler-1.1.3/lib/bundler/spec_set.rb:90:in `materialize': Could not find rake-0.8.7 in any of the sources (Bundler::GemNotFound)

from D:/ruby/lib/ruby/gems/1.8/gems/bundler-1.1.3/lib/bundler/spec_set.rb:83:in `map!'
from D:/ruby/lib/ruby/gems/1.8/gems/bundler-1.1.3/lib/bundler/spec_set.rb:83:in `materialize'
from D:/ruby/lib/ruby/gems/1.8/gems/bundler-1.1.3/lib/bundler/definition.rb:127:in `specs'
from D:/ruby/lib/ruby/gems/1.8/gems/bundler-1.1.3/lib/bundler/definition.rb:172:in `specs_for'
from D:/ruby/lib/ruby/gems/1.8/gems/bundler-1.1.3/lib/bundler/runtime.rb:11:in `setup'
from D:/ruby/lib/ruby/gems/1.8/gems/bundler-1.1.3/lib/bundler.rb:114:in `setup'
from D:/ruby/lib/ruby/gems/1.8/gems/bundler-1.1.3/lib/bundler.rb:119:in `require'
from D:/safecellweb/config/boot.rb:116:in `load_gems'
from D:/ruby/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/initializer.rb:164:in `process'
from D:/ruby/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/initializer.rb:113:in `send'
from D:/ruby/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/initializer.rb:113:in `run'
from D:/safecellweb/config/environment.rb:10
from D:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `gem_original_require'
from D:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `require'
from D:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:156:in `require'
from D:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:521:in `new_constants_in'
from D:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:156:in `require'
from D:/ruby/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/commands/server.rb:84
from D:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `gem_original_require'
from D:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `require'
from script/server:4

最佳答案

实际上你的rake版本是0.9.2

虽然您的应用需要 0.8.7

所以首先通过这个命令卸载 rake 0.9.2

gem uninstall rake -v=0.9.2

然后通过这个命令安装 rake 0.8.7

gem install rake -v=0.8.7

希望你的问题能得到解决.......

关于ruby - 在任何来源中都找不到 rake-0.8.7 (Bundler::GemNotFound),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10026190/

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