Setting Up Netbeans and Ruby

I’ve been considering some development with Ruby and Rails. As I’ve used the Netbeans IDE before and liked it, I downloaded the Ruby version to give it a try.

The main benefit here is that you can do a lot of things without the console. I can add models, scaffolds, migrate databases, and such with a few clicks.

The current default install doesn’t have the most current version of “JRuby” (that being ruby created with 100% Java) installed, so I opted to figure out how to update Netbeans with the most current interpreter.

Here is a quick list of things to do:
download the Ruby Netbeans IDE

Download latest version of JRuby

Install the new version to:
C:\Program Files\NetBeans 6.7.1\ruby2\
Depending on your install directory of Netbeans.

A directory will be created: jruby-1.4.0
Depending on the currently available version of JRuby.

In Netbeans, go to the platform manager in the menu “tools >> Ruby Platforms”: Select auto-detect platforms, or add a platform and browse to:
C:\Program Files\NetBeans 6.7.1\ruby2\jruby-1.4.0\bin\jruby.exe
This links the newly installed one with the IDE.

When creating your first project, one of the wizard steps will have a “install rails” button, click that and allow it to download and install rails for the new version of JRuby you just added. Currently that would be version 2.3.4.

Install the “activerecord-jdbcsqlite3-adapter” ruby gem through the menu item “tools >> ruby gems” if you are interested in using the sqlite database engine.
(in your database.yml file make development and test use… adapter: jdbcsqlite3 instead of sqlite3)

Change the server used to Webrick when creating a project, in one of the wizard steps (much much faster than that glassfish one) .

That’s about it to get started. I’ve started playing around with creating models and scaffolding, but I have yet to do anything worth while. I think I need to read up on the Ruby language itself to get the basic syntax down.

Edit:
I started reading and tinkering with some code for a few days.
I’m not too impressed with Ruby/Ruby on rails so far. It doesn’t seem any easier than any other language to use. It seems more like jumping through predefined hoops to get anywhere. It has some great ideas in it like parts of the data model and the ruby syntax itself. I might give it a try again sometime, but for now it is likely I will try a PHP/framework combo instead.

This entry was posted in General and tagged , , , , , . Bookmark the permalink.