# Rails application on tomcat

**URL:** <https://www.ruby-forum.com/t/rails-application-on-tomcat/146136>\
**Category:** Deployment\
**Created:** [August 18, 2008, 11:54am UTC](https://www.ruby-forum.com/t/rails-application-on-tomcat/146136 "2008-08-18T11:54:13Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![sgovind83](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/7cd45c/32.png) [@sgovind83](https://www.ruby-forum.com/u/sgovind83)\
**Post date:** [August 18, 2008, 11:54am UTC](https://www.ruby-forum.com/t/rails-application-on-tomcat/146136/1 "2008-08-18T11:54:13Z")

</div>

I have created rails application in jruby(LINUX).

I have used following version

1.Jruby 1.0.3 (in /usr/local/)  
2.Rails 2.0.2  
3.Tomcat 6  
4.JDK 1.6  
5.MYSQL connector 5.0.6.jar in $JRUBY\_HOME/lib  
6.Activerecord-jdbc-adapter

I have also update $JRUBY\_HOME and $PATH in /etc/profile .

i also add following line in environment.rb

if RUBY\_PLATFORM =~ /java/  
require ‘rubygems’  
gem ‘ActiveRecord-JDBC’  
require ‘jdbc\_adapter’  
end

To create War file i am using both goldspike and warble.Both folder  
structure are different.

Rails appication is run in webrick.

When run application in tomcat it shows ruby on rails default  
page([http://localhost:8080/application\_name](http://localhost:8080/application_name)) but it doesn’t run

after i enter the controller name next to application  
name([http://localhost:8080/application\_name/controller\_name](http://localhost:8080/application_name/controller_name)).

when using goldspike war file in tomcat it shows error “server  
overload…”

when using warble war file it shows error in 500.html file.

Whole thing is it does not redirect to controller page.

web.xml file(in Warbler jar):

 rails.env production public.root / RackFilter org.jruby.rack.RackFilter RackFilter /\* org.jruby.rack.rails.RailsServletContextListener 

I referred websites:

[http://www.developer.com/db/article.php/3691716](http://www.developer.com/db/article.php/3691716)  
[http://jairrillo.wordpress.com/2008/07/24/deploying-jruby-application-on-tomcat-glassfish-and-websphere-61/](http://jairrillo.wordpress.com/2008/07/24/deploying-jruby-application-on-tomcat-glassfish-and-websphere-61/)  
[http://wiki.jruby.org/wiki/Jruby\_on\_Rails\_on\_Tomcat](http://wiki.jruby.org/wiki/Jruby_on_Rails_on_Tomcat)

how to solve this problem ?
