JRuby

Mongrel broken w/ 1.0.3 candidate

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Blocker Blocker
  • Resolution: Fixed
  • Affects Version/s: None
  • Fix Version/s: JRuby 1.0.3
  • Component/s: Miscellaneous
  • Labels:
    None
  • Environment:
    MacOS (possibly all) Rails 2.0.1. JRuby 1.0 branch
  • Number of attachments :
    0

Description

enebo:12:14 ~/Documentsworkspace/jruby_1_0_branch/heh 771% ../bin/jruby -S gem install mongrel
Need to update 21 gems from http://gems.rubyforge.org
.....................
complete
Select which gem to install for your platform (java)
 1. mongrel 1.1.1 (mswin32)
 2. mongrel 1.1.1 (jruby)
 3. mongrel 1.1.1 (ruby)
 4. mongrel 1.1 (mswin32)
 5. mongrel 1.1 (ruby)
 6. mongrel 1.1 (jruby)
 7. mongrel 1.0.4 (mswin32)
 8. mongrel 1.0.4 (ruby)
 9. mongrel 1.0.3 (ruby)
 10. Skip this gem
 11. Cancel installation
> 6
Install required dependency gem_plugin? [Yn]  y
Install required dependency cgi_multipart_eof_fix? [Yn]  y
Successfully installed mongrel-1.1-jruby
Successfully installed gem_plugin-0.2.3
Successfully installed cgi_multipart_eof_fix-2.5.0
Installing ri documentation for mongrel-1.1-jruby...
Installing ri documentation for gem_plugin-0.2.3...
Installing ri documentation for cgi_multipart_eof_fix-2.5.0...
Installing RDoc documentation for mongrel-1.1-jruby...
Installing RDoc documentation for gem_plugin-0.2.3...
Installing RDoc documentation for cgi_multipart_eof_fix-2.5.0...
enebo:12:15 ~/Documents/workspace/jruby_1_0_branch/heh 772% ../bin/jruby script/server 
=> Booting Mongrel (use 'script/server webrick' to force WEBrick)
=> Rails application starting on http://0.0.0.0:3000
=> Call with -d to detach
=> Ctrl-C to shutdown server
Exiting
/Users/enebo/Documents/workspace/jruby_1_0_branch/lib/ruby/gems/1.8/gems/activesupport-2.0.1/lib/active_support/dependencies.rb:499:in `require': uninitialized constant Mongrel::Gems (NameError)
	from /Users/enebo/Documents/workspace/jruby_1_0_branch/lib/ruby/gems/1.8/gems/rails-2.0.1/lib/commands/server.rb:39
	from /Users/enebo/Documents/workspace/jruby_1_0_branch/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require'
	from /Users/enebo/Documents/workspace/jruby_1_0_branch/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require'
	from :1

Activity

Hide
Thomas E Enebo added a comment -

If I change:

require 'mongrel/gems'

to

load 'mongrel/gems'

Mongrel works. So at this point it thinks it has already required mongrel/gems (and prints show it requiring earlier during startup), but Mongrel::Gems is not defined. Hmmm.

trunk (1.1) does not have this problem so what is different?

Show
Thomas E Enebo added a comment - If I change:
require 'mongrel/gems'
to
load 'mongrel/gems'
Mongrel works. So at this point it thinks it has already required mongrel/gems (and prints show it requiring earlier during startup), but Mongrel::Gems is not defined. Hmmm. trunk (1.1) does not have this problem so what is different?
Hide
Rem vd H added a comment -

In my case mongrel does not start with this change (require to load) it just starts webrick instead of mongrel

Show
Rem vd H added a comment - In my case mongrel does not start with this change (require to load) it just starts webrick instead of mongrel
Hide
Vladimir Sizikov added a comment -

The problem seems to be with Ruby.defineModule() which is invoked from http11.jar library, and this call redefines the Mongrel module.

Moving require 'http11' up (above require 'mongrel/gems'), in mongrel.rb file, fixes the problem for me, and I can run the rails with mongrel after that change.

I checked, and it seems that JRuby 1.0.2 fails with exactly the same problem JRuby 1.0.3.

I also tried Mongrel 1.1, with the same results.

Show
Vladimir Sizikov added a comment - The problem seems to be with Ruby.defineModule() which is invoked from http11.jar library, and this call redefines the Mongrel module. Moving require 'http11' up (above require 'mongrel/gems'), in mongrel.rb file, fixes the problem for me, and I can run the rails with mongrel after that change. I checked, and it seems that JRuby 1.0.2 fails with exactly the same problem JRuby 1.0.3. I also tried Mongrel 1.1, with the same results.
Hide
Thomas E Enebo added a comment -

I verified that moving http11 up above mongrel/gems also works for 1.1. I also talked to Evan Weaver (evn) on channel and he says he can put out an updated version of mongrel that does this in the next day or so. When that comes out we should be good for 1.0.3 release.

Show
Thomas E Enebo added a comment - I verified that moving http11 up above mongrel/gems also works for 1.1. I also talked to Evan Weaver (evn) on channel and he says he can put out an updated version of mongrel that does this in the next day or so. When that comes out we should be good for 1.0.3 release.
Hide
Evan Weaver added a comment -

It's done.

Show
Evan Weaver added a comment - It's done.
Hide
Thomas E Enebo added a comment -

A new release of mongrel solves this issue

Show
Thomas E Enebo added a comment - A new release of mongrel solves this issue

People

Vote (1)
Watch (3)

Dates

  • Created:
    Updated:
    Resolved: