Ruby on Rails on Windows with Pain

I decided to give RoR another try (my first attempt ended with my attention deficit overcoming my desire to learn). Things didn’t work “out of the box” as I hoped.

First, I downloaded and installed Ruby 1.8.7. I was surprised to see that the installer didn’t add the Ruby bin directory to the PATH environment variable, so I had to do it myself.

Next, I downloaded and installed RubyGems 1.3.7.

My first attempt and installing Rails (gem install rails) failed with a bunch of errors (which I wasn’t diligent enough to capture for this post). Google yielded a discussion thread with people seeing the same errors. The workaround that was suggested was to uninstall Rails (gem uninstall rails), clean uninstalled gems (gem cleanup) and install Rails again. This worked. I don’t understand why it didn’t work with a pristine Ruby installation in the first place.

Then I tried creating a new application with rails new anotherShot. I then tried rails server to run the newly created application. It didn’t work. I was told to run bundle install and then try again.

This time, I got an error saying that the SQLite DLL was missing. Makes sense, but a heads up would have been nice. I went over the SQLite downloads and got the DLL. I copied the DLL to the Ruby bin directory. This time, rails server worked.

I now have yet another “Hello World” RoR application waiting for my attention. I hope this time around I will manage to write my first RoR application!