Rails:找不到gem'sdoc(> = 0)ruby' [英] Rails: Could not find gem 'sdoc (>=0) ruby'
问题描述
当rake命令在新应用程序启动时运行时,会收到许多错误消息。原因是:
blockquote
bundler / resolver.rb:302:在'resolve'中:在这台机器上可用的gem中找不到gem'sdoc(> = 0)ruby'。 (Bundler :: GemNotFound)
我已经通过不同的方法安装了多次sdoc,但我仍然收到错误。我已经研究过这个问题,并发现许多没有奏效的答案。
我试过了:' http://rubygems.org '而不是' https://rubygems.org '然后捆绑安装没有成功。
我尝试删除Gemfile.lock,然后绑定安装,但没有成功。
也许答案很明显,但我似乎无法找到它。任何援助这个问题将不胜感激。
Gemfile:
source'https://rubygems.org'
gem'rails','4.0.2'
gem'mysql2'
gem'sass-rails','〜> 4.0.0'
gem'uglifier','> = 1.3.0'
gem'coffee-rails','〜> 4.0.0'
gem'jquery-rails'
gem'turbolinks'
gem'jbuilder','〜> 1.2'
group:doc do
gem'sdoc',要求:false
end
这是因为gem已安装,但不是必需的。您可能需要删除Gemfile中的 require:false
或在您的rake任务中手动输入。这里有一个冗长的解释: Bundler:什么确实:require =>在Gemfile中是false?
I am developing a rails application in Mac after switching over from Windows. I thought that I had installed everything correctly. The IDE I'm using is Rubymine.
I receive numerous error messages when the rake command is run at the start of a new application. The cause is:
/Users/johncase/.gem/ruby/2.0.0/gems/bundler-1.5.1/lib/bundler/resolver.rb:302:in `resolve': Could not find gem 'sdoc (>= 0) ruby' in the gems available on this machine. (Bundler::GemNotFound)
I have installed sdoc multiple times through different methods, but I keep receiving the error. I have researched this problem and found many answers that have not worked.
I've tried: 'http://rubygems.org' instead of 'https://rubygems.org' then a bundle install with no success. I've tried deleting the Gemfile.lock then bundle installing with no success.
Perhaps the answer is obvious, but I cannot seem to find it. Any assistance with this problem would be much appreciated.
Gemfile:
source 'https://rubygems.org'
gem 'rails', '4.0.2'
gem 'mysql2'
gem 'sass-rails', '~> 4.0.0'
gem 'uglifier', '>= 1.3.0'
gem 'coffee-rails', '~> 4.0.0'
gem 'jquery-rails'
gem 'turbolinks'
gem 'jbuilder', '~> 1.2'
group :doc do
gem 'sdoc', require: false
end
This is because the gem is installed, but not being required. You either need to remove the require: false
in the Gemfile or require it manually in your rake task. There is a lengthy explanation of this here: Bundler: What does :require => false in a Gemfile mean?
这篇关于Rails:找不到gem'sdoc(> = 0)ruby'的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!