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 :)

5 Comments »

  1. 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.

  2. 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 [...]

  3. Steve Harris said,

    January 15, 2008 @ 5:01 pm

    Newbie question:

    Why do you ‘rails:freeze:gems’ before ‘doc:rails’ ?

    TIA

    - Steve

  4. 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).

  5. A thankful person said,

    May 20, 2008 @ 9:19 pm

    Thanks - this helped me a ton!

RSS feed for comments on this post · TrackBack URI

Leave a Comment