JRuby on Rails with Nine Lives: Running a JRuby on Rails Application on Tomcat
Now, create your scaffold for your Guitar Ruby class that Rails will use to manage your guitars table. Run the following command:
jruby script/generate scaffold Guitar
Click here for a larger image.
Figure 14: Generating the Guitar class scaffold
Testing the Rails Application Using WEBrick
Now that you have everything you need to do CRUD operations on our guitars table, give your app a quick test run using Ruby's WEBrick server. You run the following command to start WEBrick and point your browser to http://localhost:3000/guitars:
jruby script/server
Click here for a larger image.
Figure 15: Running the railswartest app using the WEBrick server
Click here for a larger image.
Figure 16: The railswartest app running on the JRuby WEBrick server
Installing Tomcat
I assume you already have Apache Tomcat installed. If not, you can download it and uncompress it to your desired installation directory. I am using Tomcat version 5.5.17; it is installed to the /opt/tomcat directory.
Creating the WAR File and Deploying It to Tomcat
To create a WAR file of your railstestwar app, run the following command:
jruby -S rake war:standalone:create
Click here for a larger image.
Figure 17: Creating the railswartest WAR



Solid state disks (SSDs) made a splash in consumer technology, and now the technology has its eyes on the enterprise storage market. Download this eBook to see what SSDs can do for your infrastructure and review the pros and cons of this potentially game-changing storage technology.