I can WAR an HTML file
admin | April 17th, 2007 | programmingThis is pretty much all I was able to accomplish over the last few days as it applies to JRuby. I haven’t dug into the Ruby language or Rails framework at all yet (besides the command “bin/rails myapplication”), but I’m loving playing with the tools JRuby provides to integrate with Java. Check this out:
jrubyc /mypath/myclass.rb
This is the command to compile Ruby code to Java byte-code. Ok, not that impressive, but just cool to write down. There is even a just-in-time compiler which ranks as extra cool. Check out this page in the JRuby wiki for more info.
I’m probably blowing the WAR magic out of proportion since it’s really just a glorified Ant task bundling up some dependencies for JEE servers to work with Rails. Here is the tutorial I used to create the WAR. I dropped it in Tomcat and it seemed to deploy w/o issue.
Maybe in a few days/weeks I’ll be able to figure out how to use the language and do something meaningful. In fact, my goal is to learn nothing about Ruby and just learn Rails. Ultimately, I can only hope to dream of the creation of the SPRUG (SPace coast Ruby Users Group) over here in Melbourne. With just the knowledge of Rails, I should be able to continue the tradition of Ruby UG’s everywhere. Just kidding fanboys! Keep “The Active-Record” alive and relax; I’m an idiot. I WAR’d an HTML file thinking it was a Rails app.
NOTE: Check out Charles Nutter’s blog if you get a chance. Since JRuby’s 1.0 release is coming soon they have a lot of fun runtime comparisons between regular old Ruby and JRuby. It’s a pretty good read from one of the head developers on the project.