Installing Ruby on Rails on Windows XP

Not really testing related, but I have to post this.

It’s hard to find instructions for installing Ruby on Rails on a WinXP box. Here’s my attempt. It’s high level, but with detail given where the process isn’t intuitive. By the end of this we should have an XP box set up with:

  • MySQL installed for the database back end
  • InstantRails providing the ruby infrastructure (includes the rails libraries) – we won’t use the apache server or the cut down MySQL installation that’s bundled in
  • Aptana providing an acceptable GUI to write your app in
  • Oracle SQL Developer to query your database
  • MySQL GUI tools to administer the database
  • FireFox with very useful extensions for viewing/debugging your app

Here’s how to do it!

Confirm the following:

  • Organisation policy allows hosting of servers (db and web) on local machine
  • Admin Access to local machine
  • Intertube connection

Download the following:

Installation and Configuration

  • Install the Java EE SDK
  • Install and configure MySQL (select “Developer Machine” and “Multifunctional Database” options)
  • Install MySQL GUI Tools
  • Install MySQL JDBC Connector to the c: drive
  • Unzip InstantRails to the c: drive
    • Execute “InstantRails.exe” and click “OK” on the dialog box that mentions changing configuration files
    • Stop the Apache and MySQL apps from within InstantRails
    • Close the InstantRails window
    • Never open InstantRails again
  • Add the following to your PATH environment variable: C:\InstantRails\ruby\bin
  • Install Aptana to the c: drive
    • Open Aptana
    • Set the workspace to: C:\InstantRails\ruby\bin
    • Open this menu: Help → Software Updates → Find and Install
    • Select “Search for new features to install”
    • Select “Aptana: Ruby on Rails Development Environment”
    • Click “Finish” and wait for list of apps to be displayed
    • Select Ruby on Rails/RadRails and install
    • Change the Aptana Perspective to “RadRails”
  • Install FireFox with the following extensions:
    • FireBug (use to watch what’s happening in your app)
    • IE Tab (use for cross-browser testing within firefox!)
  • Install SQL Developer to the c: drive
    • Open C:\sqldeveloper\sqldeveloper\bin\sqldeveloper.bat
    • In the “Database, Third Party JDBC Drivers” Preferences window, add a reference to the MySQL connector jar file
    • Create a connection to the local MySQL instance

That should be it. Sometimes Windows doesn’t pick up the change in the PATH environment variable. A reboot should do the trick