All Your Famous Friends
Originally uploaded by Thomas Hawk

I have waited for this news, JRuby 1.0.0RC3 Released – And This Is It!

I have already managed to run an example of JRuby on Rails in Tomcat with PKI at work. So what I need next was an application development environment and I’ve got JRuby on Rails running on Tomcat inside Eclipse IDE with Eclipse WebTools Platform and Aptana’s RadRails plugin.

I already have a Tomcat package coupled with JASS (Java Authentication and Authorisation Service) framework at work, which works nicely within Eclipse IDE with WTP. So, I just needed to install RadRails as a plugin to that. I can only use RadRails to develop a Rails app, but can’t run it in WEBrick because it calls Java JASS API functions to get out other information about the user. However, you can add it to a Tomcat server as an external web module (you can’t add this as a web module because it’s not a web project, but a rails project) so that you can run the Rails app with JRuby in Tomcat within Eclipse! Here is a short instruction.

  1. Download the Eclipse + WTP all-in-one package
  2. Install RadRails and configure it
  3. Create a new Rails project
  4. Create a WEB-INF folder with necessary files in the root of the project
  5. Create a new server (e.g. Tomcat)
  6. Add the Rails project as an external web module to the server. You just point the directory where the Rails project resides in and give a path like /projectname.
  7. Start the server
  8. Open a browser in Eclipse and access the webapp (screenshot)

Related Posts: