Setting up Ruby on Rails development environment with NetBeans on Windows

I've set up NetBeans for Ruby on Rails with NetBeans twice today -- first at work for a friend who is moving to RoR development from PHP, and then at home where a dying hard disk forced me to get a new hard disk and install all the software I require all over again.

I realized that setting up a Rails environment might seem a daunting task for a newbie. Here's a list of steps to get Ruby on Rails working on a windows machine. I use NetBeans with MySQL because I found the least trouble to set up.

  1. Go to www.ruby-lang.org and download the ruby one-click installer for Windows.

  2. Install ruby using the one-click installer, and remember to select RubyGems when asked what components you want installed.

  3. Download and install MySQL from http://dev.mysql.com/downloads/.

  4. You will need java to run NetBeans, so download java from http://www.java.com/en/ and install.

  5. Download the latest version (6.7 at the moment) of NetBeans from http://www.netbeans.org/. You might choose the complete NetBeans package or the Ruby only version. Either of them will do.

  6. Install rails for your ruby installation by using this command in the command line:

    gem install rails

  7. You will also need the ruby MySQL driver to be installed to be able to use MySQL databases. For this, install the mysql gem by this command:

    gem install mysql

  8. When I started NetBeans and created a new rails project, NetBeans asked me to update ruby gems from 1.3.1 to 1.3.2. Unfortunately, the one click installer is available only for Ruby 1.8.6 and contains gem version 1.3.1, so you'll have to update rubygems using the command line:

    gem update --system


That's it... you can now use NetBeans as a rails development environment. I know that was a very long list of steps to get a rails IDE working, but it's worth the trouble. Using ruby on rails as your development environment will make up for the effort required to set up the IDE.

What IDE do you use for rails development? When you were new to rails development, did you have trouble setting up a development environment? And in case you're a newbie rails developer, is that how you got here?

3 comments:

Shantharam Shenoy K said...

Hey dude many many thanks for the help @office and it was nice to post all the steps here considering my rather weak memory at the moment, it will be damn helpful. And i was going to use Instant Rails, this looks easy and definitely much better to use..

TechSlam said...

Wonderful post Railer.... It will surely help the aspiring developers making a move to Rails.

Eugeniy said...

Looks like the most rapidly developed Rails IDE today is RubyMine: http://www.jetbrains.net/confluence/display/RUBYDEV/RubyMine+EAP

Post a Comment