Monday, June 11, 2007

Using JRuby 1.0 on NetBeans

Congratulations on JRuby 1.0 release! Right after the release, I successfully updated JRuby of my NetBeans. Here's what I did.
  1. Install JDK 1.6.0 or later. Ubuntu(and probably other Linux) users *must* use JDK 1.6.0(never use 1.6.0_01) to avoid the problem that some dialog windows of NetBeans don't open.
  2. Download a JRuby 1.0 binary version of archive from http://jruby.codehaus.org/ and extract files.
  3. If you use Java DB for a Ruby on Rails Application, make symbolic link to jdk1.6.0/db/lib/derbyclient.jar in the directory, jruby-1.0/lib or copy it in this directory.
  4. Download Full version of NetBeans 6.0M9 from http://bits.netbeans.org/download/6.0/milestones/latest/ and install it.
  5. Start up NetBeans.
  6. Click Tools in the tool bar, select Options, click Miscellaneous, and open Ruby Installation. Type full path to jruby command or click Browse button and select jruby command from extracted JRuby 1.0 files.
  7. Click Tools in the tool bar, select Ruby Gems, and click Update all button.
  8. Install Rails when you create Ruby on Rails project for the first time by clicking Next button in the dialog window in which you typed the project name. Install Rails button shows up to allow us to click it.
After updating JRuby from 0.9.8 to 1.0, I tried the 10 minutes example introduced at http://www.netbeans.org/kb/60/rapid-ruby-weblog.html. The example worked fine.

No comments: