Edge Rails 3: Mongrel stuck in infinite loop, Unicorn missing uninitialized constant Rack::Runtime


I wanted to try out Edge Rails 3 today and hit a serious problem
trying to run mongrel.

script/rails server mongrel just hangs. Interrupting and looking up
the spot of the lockup revealed

$LOAD_PATH.unshift ‘projects/mongrel_experimental/lib/’
Mongrel::Gems.require ‘mongrel_experimental’,

at the bottom of mongrel.rb. This executes Mongrel::Gems.require which
contains this wonderful ($%^##&#) infinite loop:


ActiveSupport breaks ‘require’ by making it always return a true

Kernel.require ‘rubygems’
version ? gem(library, version) : gem(library)
rescue Gem::LoadError, LoadError, RuntimeError

puts “** #{library.inspect} could not be loaded” unless library ==


Removing the two lines cited above from mongrel.rb cures the problem.
This is however not a feasible solution, since these lines are in the
system-wide mongrel gem and I don’t think hacking around in these is
a good idea.

I tried Unicorn as well but it always presented me with a
`load_missing_constant’: uninitialized constant Rack::Runtime

Does anyone have an idea how to solve this?

kind regards


Hi Jan.
I had the same problem, even with other two othes gems, and I resolved
the issue adding the gems in Gemfile and doing ‘bundle install’.

the gems were:

gem “cgi_multipart_eof_fix”
gem “fastthread”
gem “mongrel_experimental”

all of them are required in mongrel.rb with sentecese like

Mongrel::Gems.require ‘cgi_multipart_eof_fix’ (line 16)
Mongrel::Gems.require ‘fastthread’ (line 17)
Mongrel::Gems.require ‘mongrel_experimental’ (line 355)

I don’t know the diference with a normal require ‘gem’ statement, but I
think here is the problem.

Hope this helps.
Juan M. Cervera

Yeah, I already read that in your comment on the Rails weblog.
Thanks a lot!

With the Rails prerelease gem, Unicorn seems to be working again.

Problem solved.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs