Use JRuby and Compile It

Download JRuby, and extract it in di /usr/local
Edit the Environment Variables.

export PATH="/usr/local/jruby-1.4.0/bin"

Close the Terminal/Console/Command Prompt, and check it by

jruby -v

if there’s an output, the installation is corrent.

Use Jruby by :

jruby rubycode.rb

To Compile JRuby into a Java Class, use jrubyc

jrubyc rubycode.rb

To run a JRuby class by java, also give environment path for jruby.jar

java -cp .:/usr/local/jruby-1.4.0/lib/jruby.jar rubycode

Happy Exploring with JRuby


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s