September 19, 2018
Hot Topics:

JRuby on Rails with Nine Lives: Running a JRuby on Rails Application on Tomcat

  • July 31, 2007
  • By Dominic Da Silva
  • Send Email »
  • More Articles »

You also can clean all temporary WAR files by running the command:

jruby -S rake tmp:war:clear

Copy the railswartest.war file to the /opt/tomcat/webapps directory:

Click here for a larger image.

Figure 18: Copying the railswartest WAR file to the Tomcat webapps directory

Start up Tomcat; you should be able to point your browser to http://localhost:8080/ and see the Rails welcome page:

Click here for a larger image.

Figure 19: Starting up the Tomcat server

Click here for a larger image.

Figure 20: The railswartest app Rails welcome page running on the Tomcat server

Now, test the CRUD for the guitars table. Point the browser to http://localhost:8080/guitars; you should see an empty guitar list. You now can do some simple CRUD operations on the guitars table to test your app. What is happening under the covers is really exciting. Your JRuby on Rails app is running on Tomcat and is using JDBC to perform CRUD actions on the guitars table! The following screenshots show some CRUD operations on the guitars table:

Click here for a larger image.

Figure 21: Empty guitars table

Page 6 of 8

Comment and Contribute


(Maximum characters: 1200). You have characters left.



Enterprise Development Update

Don't miss an article. Subscribe to our newsletter below.

By submitting your information, you agree that developer.com may send you developer offers via email, phone and text message, as well as email offers about other products and services that developer believes may be of interest to you. developer will process your information in accordance with the Quinstreet Privacy Policy.


Thanks for your registration, follow us on our social networks to keep up-to-date