rails s:在任何源代码中找不到rake-10.4.2(Bundler :: GemNotFound) [英] rails s: Could not find rake-10.4.2 in any of the sources (Bundler::GemNotFound)

查看:309
本文介绍了rails s:在任何源代码中找不到rake-10.4.2(Bundler :: GemNotFound)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我开始使用rails时:

  $ rails s 

我得到:

  /Users/snowcrash/.rvm/ gems/ruby-2.1.5@global/gems/bundler-1.3.5/lib/bundler/spec_set.rb:92:在`block in materialize'中:在任何源代码中找不到rake-10.4.2(Bundler :: GemNotFound)

所以,我运行了 bundle install

  $ bundle install 
使用rake 10.4.2

gem list rake 给出:

  ***本地GEMS *** 

耙(10.1.0,10.0.4)

我怎么没有安装 rake 10.4.2



另外,当我运行 bundle check 时,它给了我:

  Gemfile的依赖关系满足

这似乎不正确。为什么?



==== UPDATE



我用 rake 做:

  gem install rake 

但为什么我必须手动安装它?我认为这是Bundler的工作。



试着再次启动rails给了我另一个问题:

 在任何来源(Bundler :: GemNotFound)中找不到multi_json-1.10.1 

显然这里有一些潜在的问题。任何建议?

解决方案

我有这个问题使用rbenv我的红宝石2.2.0安装。



我试着做 gem install rake ,但是这并没有解决它。
所以我做了:

pre $ gem uninstall rake
rbenv global 2.1.1
rbenv rehash
rbenv卸载rake#这个时间给出错误rake是一个默认的gem
rbenv global 2.2.0
rbenv rehash
gem install rake
rails s #works this时间

我的期望是在PATH或类似的地方可能存在冲突,删除

我之前有过multi_json的错误。通过手动安装来修复它 gem install multi_json


When I start rails with:

$ rails s

I get:

/Users/snowcrash/.rvm/gems/ruby-2.1.5@global/gems/bundler-1.3.5/lib/bundler/spec_set.rb:92:in `block in materialize': Could not find rake-10.4.2 in any of the sources (Bundler::GemNotFound)

So, I ran bundle install:

$ bundle install
Using rake 10.4.2

but gem list rake gives:

*** LOCAL GEMS ***

rake (10.1.0, 10.0.4)

How come I don't have rake 10.4.2 installed?

Also, when I run bundle check it gives me:

The Gemfile's dependencies are satisfied

which does not seem to be correct. Why?

==== UPDATE

I fixed the problem with rake by doing:

gem install rake

but why did I have to install it manually? I thought that was Bundler's job.

And trying to start rails again gave me another problem:

Could not find multi_json-1.10.1 in any of the sources (Bundler::GemNotFound)

Clearly there's some underlying problem here. Any suggestions?

解决方案

I had this problem using rbenv for my ruby 2.2.0 install. Fixed through trial and error.

I tried doing gem install rake but this didn't fix it. So I did:

gem uninstall rake
rbenv global 2.1.1
rbenv rehash
rbenv uninstall rake #this time gives error "rake is a default gem"
rbenv global 2.2.0
rbenv rehash
gem install rake
rails s #works this time

My expectation is that there was maybe a conflict somewhere in PATH or similar that was resolved with a complete remove

I've had that error with multi_json before. Fixed it by doing manual install gem install multi_json

这篇关于rails s:在任何源代码中找不到rake-10.4.2(Bundler :: GemNotFound)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆