Rails 1.2.6 gem freeze fails with gem 0.9.5 system

Skip to first unread message


Nov 26, 2007, 12:21:16 PM11/26/07
to Ruby on Rails: Core
Freezing to the gems for Rails 1.2.6
rake aborted!
uninitialized constant Gem::GemRunner

tracing gives:
no such file to load -- /Users/nathany/Sites/boat/oat/config/../vendor/

which seems like it may be trying to load the frozen gems before they
are there?

It doesn't do a nice rollback on failure... leaving the empty vendor/
rails/ folder there, which of course causes a mess of things.

Anyone else experience this, or get it working with the same setup?
I'm guessing it's more gem related than 1.2.6 related, but I haven't

- nathan.


Nov 26, 2007, 12:30:21 PM11/26/07
to Ruby on Rails: Core
To confirm, I uninstalled Rails 1.2.6 and ran into the same problem
with 1.2.5. So it is more than likely related to my recent update to
the gem 0.9.5 system.

Leonard Chin

Nov 27, 2007, 1:52:14 AM11/27/07
to rubyonra...@googlegroups.com

What seems to have happened is that gem_runner is no longer required
automatically when you require rubygems. It appears to be an
intentional change in rubygems, as a part of "slimming" it down for
inclusion in 1.9


The trivial fix is to add a line to require the rubygems/gem_runner.rb
in railties/lib/tasks/framework.rake

A quick check of the rubygems commit logs reveals that there could be
a fix down the line (r1515 will apparently "faults in the full
rubygems library if any Gem constant or method is called.") so it
might not be worthwhile actually patching this.


Index: railties/lib/tasks/framework.rake
--- railties/lib/tasks/framework.rake (revision 8220)
+++ railties/lib/tasks/framework.rake (working copy)
@@ -4,6 +4,7 @@
task :gems do
deps = %w(actionpack activerecord actionmailer activesupport
require 'rubygems'
+ require 'rubygems/gem_runner'

rails = (version = ENV['VERSION']) ?

Reply all
Reply to author
0 new messages