Archive for November 28th, 2007|Daily archive page

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:

  1. rails dummy
  2. cd dummy
  3. rake rails:freeze:gems
  4. rake doc:rails
  5. 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 :)