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

**URL:** <https://www.ruby-forum.com/t/edge-rails-3-mongrel-stuck-in-infinite-loop-unicorn-missing-uninitialized-constant-rack-runtime/182975>\
**Category:** Rails\
**Created:** [February 5, 2010, 1:52pm UTC](https://www.ruby-forum.com/t/edge-rails-3-mongrel-stuck-in-infinite-loop-unicorn-missing-uninitialized-constant-rack-runtime/182975 "2010-02-05T13:52:45Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ja-va](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/9d8465/32.png) [@ja-va](https://www.ruby-forum.com/u/ja-va)\
**Post date:** [February 5, 2010, 1:52pm UTC](https://www.ruby-forum.com/t/edge-rails-3-mongrel-stuck-in-infinite-loop-unicorn-missing-uninitialized-constant-rack-runtime/182975/1 "2010-02-05T13:52:45Z")

</div>

Hi,

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’,  
“\>=#{Mongrel::Const::MONGREL\_VERSION}”

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

begin

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

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

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

“mongrel\_experimental”  
end

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  
(NameError).

Does anyone have an idea how to solve this?

kind regards

Jan

---

<div class="post-metadata">

**Author:** ![ja-va](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/9d8465/32.png) [@ja-va](https://www.ruby-forum.com/u/ja-va)\
**Post date:** [February 5, 2010, 3:45pm UTC](https://www.ruby-forum.com/t/edge-rails-3-mongrel-stuck-in-infinite-loop-unicorn-missing-uninitialized-constant-rack-runtime/182975/2 "2010-02-05T15:45:16Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![ja-va](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/9d8465/32.png) [@ja-va](https://www.ruby-forum.com/u/ja-va)\
**Post date:** [February 5, 2010, 5:42pm UTC](https://www.ruby-forum.com/t/edge-rails-3-mongrel-stuck-in-infinite-loop-unicorn-missing-uninitialized-constant-rack-runtime/182975/3 "2010-02-05T17:42:46Z")

</div>

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.
