Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/amazon-s3/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ruby 在任何源中都找不到rake-0.8.7(Bundler::GemNotFound)_Ruby_Ruby On Rails 3_Ruby On Rails 3.1_Rubygems - Fatal编程技术网

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

Ruby 在任何源中都找不到rake-0.8.7(Bundler::GemNotFound),ruby,ruby-on-rails-3,ruby-on-rails-3.1,rubygems,Ruby,Ruby On Rails 3,Ruby On Rails 3.1,Rubygems,我使用的是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.

我使用的是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
gem install rake -v=0.8.7
然后通过此命令安装rake 0.8.7

gem uninstall rake -v=0.9.2
gem install rake -v=0.8.7

希望您的问题能够得到解决。…。

实际上您的rake版本是0.9.2

而您的应用程序需要0.8.7

因此,首先通过此命令卸载rake 0.9.2

gem uninstall rake -v=0.9.2
gem install rake -v=0.8.7
然后通过此命令安装rake 0.8.7

gem uninstall rake -v=0.9.2
gem install rake -v=0.8.7

希望您的问题能够得到解决……。

即使我在使用RubyMine运行应用程序时也遇到了同样的问题

我采取的步骤: 我在我的机器上安装了新的Ruby。 2更改了Ruby在环境变量中的路径。 3使用以下步骤更改RubyMine中Ruby的路径:- 单击文件->设置->Ruby SDK和Gems
4然后运行bundle安装

即使我在使用RubyMine运行应用程序时也遇到了同样的问题

我采取的步骤: 我在我的机器上安装了新的Ruby。 2更改了Ruby在环境变量中的路径。 3使用以下步骤更改RubyMine中Ruby的路径:- 单击文件->设置->Ruby SDK和Gems
4然后运行bundle安装

运行这些命令问题将得到解决 步骤1:安装rake gem安装rake-v“0.8.7”

步骤2:安装bundler gem安装bundler

步骤3:捆绑安装


它将解决问题。

运行这些命令,问题将得到解决 步骤1:安装rake gem安装rake-v“0.8.7”

步骤2:安装bundler gem安装bundler

步骤3:捆绑安装

它将解决这个问题