History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: JRUBY-1697
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Blocker Blocker
Assignee: Unassigned
Reporter: Thomas E Enebo
Votes: 1
Watchers: 3
Operations

If you were logged in you would be able to see more operations.
JRuby

Mongrel broken w/ 1.0.3 candidate

Created: 10/Dec/07 12:21 PM   Updated: 22/Dec/07 06:26 AM
Component/s: Miscellaneous
Affects Version/s: None
Fix Version/s: JRuby 1.0.3

Time Tracking:
Not Specified

Environment: MacOS (possibly all) Rails 2.0.1. JRuby 1.0 branch


 Description  « Hide
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


 All   Comments   Work Log   Change History      Sort Order: Ascending order - Click to sort in descending order
Thomas E Enebo - 10/Dec/07 12:51 PM
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?


Rem vd H - 14/Dec/07 04:24 AM
In my case mongrel does not start with this change (require to load) it just starts webrick instead of mongrel

Vladimir Sizikov - 14/Dec/07 02:28 PM
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.


Thomas E Enebo - 14/Dec/07 02:51 PM
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.

Evan Weaver - 15/Dec/07 03:05 AM
It's done.

Thomas E Enebo - 15/Dec/07 09:07 AM
A new release of mongrel solves this issue