Rubygems 0.9.5 and Rails 1.2.6 - uninitialized constant Gem::GemRunner
This morning I update my Rails installation to 1.2.6 and that is why I need to have a new local copy of Rails 1.2.6 API documentation. I usually get my local API documentation using these steps:
- rails dummy
- cd dummy
- rake rails:freeze:gems
- rake doc:rails
- mv doc/api ~/docs/ruby/rails/
and then I have my local API docs at $HOMOE/docs/ruby/rails/api/
That was when everything worked fine. This morning, those steps result error which I suspect from gem:
uninitialized constant Gem::GemRunner
So I began searching. Luckily I found this:
http://groups.google.com/group/rubyonrails-core/browse_thread/thread/d3e96496eca8735c
Then I edited this file:
$GEM-HOME/gems/rails-1.2.6/lib/tasks/framework.rake
and add require ‘rubygems/gem_runner’ between these lines:
deps = %w(actionpack activerecord actionmailer activesupport actionwebservice) require 'rubygems' require 'rubygems/gem_runner' Gem.manage_gems
Everything runs well now ![]()
Andry said,
November 30, 2007 @ 2:04 am
I have found that I need to re-create dummy app (e.g complete remove dummy and recreate dummy again) after having framework.rake edited.
Apparently issuing rake:freeze:gems without edited framework.rake will create empty dummy/vendor/rails/ and that’s how the problem start.
I run rails 1.2.6 and rubygems 0.9.5 also on LinuxMint 4.0.
GemRunner is no longer automatically required by Rubygems 0.9.5 « 3 Weeks said,
December 6, 2007 @ 8:36 am
[...] isn’t required automatically now, which breaks the freezing of Rails. Florian Aßmann, bpdp have the fix: adding the require to [...]
Steve Harris said,
January 15, 2008 @ 5:01 pm
Newbie question:
Why do you ‘rails:freeze:gems’ before ‘doc:rails’ ?
TIA
- Steve
tedster said,
January 19, 2008 @ 6:22 pm
Andry, I also saw that problem after editing my framework.rake file.
I deleted the vender/rails subdirectory and fixed it (messes up my svn, but that’s easily fixed).
A thankful person said,
May 20, 2008 @ 9:19 pm
Thanks - this helped me a ton!