October 31, 2014
Hot Topics:
RSS RSS feed Download our iPhone app

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.

 

 


Sitemap | Contact Us

Rocket Fuel