Having problems getting glassfish to even run on my server. jRuby is absoutely maddening to begin with, but this is killing me.
I have a pretty complex app, so I won’t go into too many details, other than to say the Rails2 version is working under jRuby 1.5.1.
When I start and do the first hit on the server I get the following error:
Feb 19, 2011 12:20:14 AM com.sun.grizzly.jruby.RackGrizzlyAdapter dispatchRequest
WARNING: (NoMethodError) undefined method `call' for nil:NilClass
org.jruby.exceptions.RaiseException: (NoMethodError) undefined method `call' for nil:NilClass
at Rack::Handler::Grizzly.call(/usr/local/rvm/gems/jruby-1.6.0.RC2/gems/glassfish-1.0.3.dev-universal-java/lib/rack/handler/grizzly.rb:55)
I have tried starting glassfish every way since sunday and have also swapped out various gems. It seems bundler 1.0.10 also has some issues. It broke my Rails2 app.
Any insite anywhere as to where to even start looking would be appreciated.
The app works just fine when running webrick.
The jRuby stack still has a long way to go. Finally figured this debacle out. Turns out the rackup.rb file pulled into glassfish from an as yet unidentified source (I hacked it for now and moved on) has logic that only supports rack in development, test or production. I was using a multistage environment so I could test things out. I had a, shocker, staging environment. So this all worked fine under the old glassfish that detected and ran rails separately but created a host of issues for the rails3 application running with a config.ru rack file.
I will post an update to my blog when I get this nailed down correctly. You can’t monkey patch this because glassfish loads from the installed gem location not your own project or even bundle repository.