Problems Upgrading to Rails 2.1.0 with JRuby

Hi everyone - I’m having difficulty upgrading to Rails 2.1.0 from the
configuration listed below. I’m testing our app out to see if we can
upgrade
our stack. I use a Mac (OS 10.5), but everyone else on the dev team uses
Ubuntu. I generally have more trouble with JRuby than they do, so I’m at
the
point where I’m about to try it on Ubuntu and see if it works there.

Here’s the configuration I started with:

Software
* Subversion
* Java 6
* JRuby 1.1.1
* Ruby 1.8.6 (for Selenium)
* PostgreSQL >= 8.2
* Tomcat 6
Gems
* rails (2.0.2) and all of its dependencies
* jruby-openssl
* hpricot
* mechanize
* rest-open-uri
* postgres-pr
* warbler
* Selenium-1.0.2 used to drive recorded browser based tests
* haml (installed as a vendor/plugin)

In the process, I have upgraded to the most recent version of all of
these
gems and to JRuby 1.1.3.

When I run the app in Apache, I get the following error:
org.jruby.rack. RackInitializationException: no such file to load –
haml

For a while, I was also getting this error:
org.jruby.rack.RackInitializationException: IO error –
active_support/core_ext/date

This second error went away when I re-installed the Rails gem.

Apache crashes when this happens. Here’s the whole trace:

SEVERE: Exception caught
org.jruby.rack.RackInitializationException: no such file to load – haml
from
file:/Library/apache-tomcat-6.0.16/webapps/nedss/WEB-INF/lib/jruby-complete-1.1.3.jar!/META-INF/jruby.home/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
require' from /Library/apache-tomcat-6.0.16/webapps/nedss/WEB-INF/gems/gems/activesupport-2.1.0/lib/active_support/dependencies.rb:509:in require’
from
/Library/apache-tomcat-6.0.16/webapps/nedss/WEB-INF/gems/gems/activesupport-2.1.0/lib/active_support/dependencies.rb:354:in
new_constants_in' from /Library/apache-tomcat-6.0.16/webapps/nedss/WEB-INF/gems/gems/activesupport-2.1.0/lib/active_support/dependencies.rb:509:in require’
from
/Library/apache-tomcat-6.0.16/webapps/nedss/WEB-INF/vendor/plugins/haml/init.rb:14:in
`evaluate_init_rb’

at

org.jruby.rack.DefaultRackApplicationFactory$4.init(DefaultRackApplicationFactory.java:153)
at
org.jruby.rack.DefaultRackApplicationFactory.getApplication(DefaultRackApplicationFactory.java:53)
at
org.jruby.rack.PoolingRackApplicationFactory.getApplication(PoolingRackApplicationFactory.java:92)
at
org.jruby.rack.DefaultRackDispatcher.process(DefaultRackDispatcher.java:31)
at org.jruby.rack.RackFilter.doFilter(RackFilter.java:51)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
at
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:525)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
at
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
at java.lang.Thread.run(Thread.java:637)
Caused by: org.jruby.exceptions.RaiseException
Jul 31, 2008 12:03:21 AM org.apache.catalina.core.ApplicationContext log
INFO: SessionListener: contextDestroyed()
Jul 31, 2008 12:03:21 AM org.apache.catalina.core.ApplicationContext log
INFO: ContextListener: contextDestroyed()

I would really appreciate any help you can give.


David Christiansen

[email protected]
www.techdarkside.com
317-966-6154 (mobile)

On Thu, Jul 31, 2008 at 7:39 AM, David Christiansen
[email protected] wrote:

* Java 6
* postgres-pr

from

`require’
at
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
at
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
at java.lang.Thread.run(Thread.java:637)
Caused by: org.jruby.exceptions.RaiseException
Jul 31, 2008 12:03:21 AM org.apache.catalina.core.ApplicationContext log
INFO: SessionListener: contextDestroyed()
Jul 31, 2008 12:03:21 AM org.apache.catalina.core.ApplicationContext log
INFO: ContextListener: contextDestroyed()

Can you check the contents of your war file to make sure that haml
really did get included? “jar tf mywar.war | grep haml”

If it isn’t, that means warbler is not packaging it for some reason
that we’ll need to discover.

Feel free to stop by #jruby on freenode, I should be there most of the
day.

/Nick


To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email

Thanks Nick. I updated the warbler file to require haml (we were
previously
running it as a plugin), and that fixed the problem. I’m up and running
now!

Dave

On Thu, Jul 31, 2008 at 12:13 PM, Nick S. [email protected]
wrote:

Here’s the configuration I started with:
* jruby-openssl
gems and to JRuby 1.1.3.

/Library/apache-tomcat-6.0.16/webapps/nedss/WEB-INF/gems/gems/activesupport-2.1.0/lib/active_support/dependencies.rb:509:in

org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)

at

INFO: SessionListener: contextDestroyed()

/Nick


To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email


David Christiansen

[email protected]
www.techdarkside.com
317-966-6154 (mobile)