Ultimate Rails Developer Toolkit for Windows
I totally love Rails, but I’ve never done a ton with it because I can’t use Linux as a primary OS for a lot of reasons, so development meant running a VM or using a spare machine. Not anymore. The tooling for Windows has come a long way and now it’s plenty good enough for Rails development. So, let’s run through the tools I’m using and how you can get your machine set up to do some Rails dev too!
Step 1.) Download Prerequisites
- Aptana Studio 3 Beta – Super awesome Rails editor (Optional but highly recommended)
- Ruby 1.8 Installer for Windows
- MSYSGit 1.7 (Be sure to get the FULL Installer)
- Firefox (if not already installed)
- SQLite Binary and DLL For Windows (required to use SQLite)
Step 2.) Install Ruby 1.8
Find your downloaded Ruby installer package and run it. Next through until you get to the “Chose Components” section.

Un-check ScITE, unless you just happen to like that text editor. In this howto we’re more focused on using Aptana so we don’t need or want ScITE for anything. Be sure you do check “Enable RubyGems” otherwise we won’t be able to install Rails in a bit.
Install to C:\Ruby, and when it finishes, congrats!
Step 3.) Update RubyGems and install Rails
Time to do some fun work. Open up a Command Prompt (Programs > Accessories) and type the following:
gem update --system

After pressing “Enter” you’ll see RubyGems update, which could take a few minutes or longer depending on your system and Internet connection. When that finishes, you’ll want to install Rails via the command:
gem install rails

This will also take several minutes to complete, so sit back and relax.
Step 4.) Install MSYSGit
Even if you don’t plan on ever using it, you should install Git while you’re at it. Fire up your MSYS Git full installer, and next through until you get to the Select Components screen.

I would recommend checking the option to add “Git Bash Here” to the context menu. If you’re super uncomfortable with the idea of using the command line, you can check to add the GUI option as well. It’s not needed if you’re only going to touch the code with Aptana, but it’s nice to have a fallback option as well.

Next you’ll be prompted to select how you want to run Git. Stick with “Use Git Bash only” unless you have a specific reason to use anything else.

Next, you’ll want to use the default option for line endings – Checkout Windows-style, commit Unix-style. This way your editors will all work correctly, but the code repository will have what has become the standard of Unix line endings for consistency and to prevent odd issues from cropping up later on.
After the install finishes, you should set the global values in Git for your name and email address. This way checkins are appropriately attributed to you. Find your Git Bash icon on the desktop and give it a double-click.
From there you’ll run 2 git config commands to set your name and email address.

git config --global user.name "Your Name" git config --global user.email "you@domain.TLD"
Now Git is configured and ready to go.
Step 5.) Installing SQLite 3
Now we need SQLite installed so that our local rails apps can use this lightweight and fast SQL Database. It’s super easy, those two .zip files you downloaded containing the Windows Binary and DLL file? Extract sqlite3.exe and sqlite3.dll and copy them to c:\Ruby\Bin

Step 6.) Installing Aptana
Launch your Aptana installer, and install away. Once the installation is finished, launch it.
Next, File > New > Rails Project

Set the name to “Hello World” and leave everything else at the default. Aptana will work for a second and then ask:

Go ahead and say “Yes.”
Next we need to work around a little bug in Aptana. Open Window > Preferences and navigate to Aptana > Themes. Click the “Apply” button. Otherwise the editors will use the wrong text colors and be near unintelligable.

Click OK and let’s take a look at the interface.
On the left you see a directory structure, and on the right you see two terminal windows. Looks a little daunting if you haven’t done much or any Rails development, but if your familiar you want to shout “YES, Someone GOT IT!” So let’s do some coding just to get you used to the interface.
Probably the best thing to do from the get go is try and run the app. It’s the default Rails app, so it will actually run. There are two ways to kick it off. A true rubyist like myself would hop right into that bottom terminal and run “script/server” and let it go, but for those of you who want to use the IDE heavily you can also kick it off with the gear icon in the App Explorer or through the shortcut key command CTRL + SHIFT + \. In a few seconds you’ll have a running app server, so open a web browser and visit http://localhost:3000.

Welcome aboard! Now, go ahead and click the “About your Application’s Environment” Oops! Something went wrong! Well, it’s a simple issue, you see we haven’t set up the database yet. Hop back over to Aptana and in the big main console window fire off a “rake db:migrate” and it will take care of everything for you.
Guess what, I was joking, we still haven’t installed the SQLite3 gem, so Ruby has no idea how to talk to the database.

It’s OK, it’s an easy fix. Just fire off a “gem install sqlite3-ruby” and it will install what it needs. Then you can re-run the migration and refresh your browser and it will be happy.
Enjoy! There are tons of great Rails tutorials out there that can take you from here to rubyist in no time 





Comments are closed.