Question

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
Was it helpful?

Solution

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?

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top