Search |
||||||
Getting Started with JRuby - Tutorial at RailsConfPosted by arungupta on May 17, 2007 at 1:04 PM PDT
JRuby is 100% pure-Java implementation of the
Ruby programming language. The goal is to use the power of Ruby programming
language and leverage the power of Java platform. Read a more detailed tutorial
here. All Ruby scripts work with JRuby instead of the original C-based
implementation. Also the goal is NOT an attempt to alter Ruby or add
incompatible features. You can download
JRuby implementation, unzip it and
set JRUBY_HOME to the installation directory. Here is a sample JRuby code: The code above shows how Ruby and Java code can be mixed with each other.
Line 1 includes Java support. Line 2 imports Java classes. Line 5 and 6 creates
a new variables using a mix of Java and Ruby syntax. Line 7 and 8 uses the
instance variables in Ruby syntax. Line 9 prints the title of the frame. If you
run this code using JRuby interpreter then you get: Here are some of the differences (from the original C-based implementation) in JRuby:
Here are some other points that the tutorial talked/showed:
The biggest pain point from the audience was Rails deployment. With JRuby and GlassFish, you can continue deploying your apps on Mongrel. Because of JRuby, it also allows you to deploy your RoR applications on GlassFish, open-source, production-quality, Java EE 5 compatible application server. BTW, there is supposed to be wireless connectivity through out the conference but it's very spotty :( Technorati: glassfish rubyonrails ror netbeans railsconf »
Related Topics >>
Web Applications Comments
Comments are listed in date ascending order (oldest first)
|
||||||
|