Rack and Tomcat can't find gem

Hello, I’ve been struggling for awhile now trying to get my sample rails
app to run on Tomcat. I’m using JRuby in conjunction with Warbler to
create my war file.

I’m using jruby 1.1.6, warbler 0.9.12, rails 2.1.0, Tomcat 5.5.27 (which
is the target version for my real Rails app to be deployed on), JDK 1.6
and running this on Ubuntu 8.10.

I was just trying to get a very simple rails app (assign a string in a
controller and output its value in a view), make the war and deploy.
All the examples online looked like this should be a piece of cake.

Made my war (warble war), built my war file just fine. Dropped said war
file in the webapps directory, started tomcat, default location came up
fine, showed the Rails homepage, went to access my controller and I get
a 500 error.

In the localhost log I see the following:

SEVERE: Exception caught
org.jruby.rack.RackInitializationException: Could not find RubyGem
activesupport (>= 0)

from
file:/usr/local/tomcat/webapps/sample_app/WEB-INF/lib/jruby-rack-0.9.3.jar!/jruby/rack/rails.rb:46:in
require_frameworks_with_servlet_env' from /usr/local/tomcat/webapps/sample_app/WEB-INF/config/../vendor/rails/railties/lib/initializer.rb:113:inprocess’
from
/usr/local/tomcat/webapps/sample_app/WEB-INF/config/…/vendor/rails/railties/lib/initializer.rb:93:in
run' from /usr/local/tomcat/webapps/sample_app/WEB-INF/config/environment.rb:13 from /usr/local/tomcat/webapps/sample_app/WEB-INF/config/environment.rb:29:inload’
from
file:/usr/local/tomcat/webapps/sample_app/WEB-INF/lib/jruby-rack-0.9.3.jar!/jruby/rack/rails.rb:29:in
load_environment' from file:/usr/local/tomcat/webapps/sample_app/WEB-INF/lib/jruby-rack-0.9.3.jar!/jruby/rack/rails.rb:152:innew’
from :3
from
file:/usr/local/tomcat/webapps/sample_app/WEB-INF/lib/jruby-rack-0.9.3.jar!/rack/builder.rb:22:in
instance_eval' from file:/usr/local/tomcat/webapps/sample_app/WEB-INF/lib/jruby-rack-0.9.3.jar!/rack/builder.rb:22:ininitialize’
from :3

I checked the gems I had installed, seems I was missing that one, so I
added it (jruby -S gem install … ) and found it was there then.
Restarted Tomcat, same error.

So my question is, can Tomcat not find these? Do I need to set an
environment variable somewhere so that Tomcat can see my gem library?
I’ve tried editing the warble.rb file in my app but any changes I seem
to make in there still results in the same log entry.

Any help or suggestions would be greatly appreciated!