Categories
Uncategorized

RailsInstaller: The Easy Way to Install Rails on Windows

Although the video below is from 2006 (it’s from the first Railsconf), it’s still pretty representative of the Ruby on Rails development world: most of it seems to happen on Macs. From the Supreme Overlord DHH down to the newest newbie typing “rails s” on the console for the first time, it looks as though most Rails projects out there start their lives on computers with Apple logos:

Rails and Windows 7 logos

(That’s me going “Mac…Mac…Mac…” as I tally each laptop. I can’t be certain, but I believe that the guy in the brown zip-up sweater at the 0:09 mark is Tobias Lütke, Shopify’s CEO and the guy who offered me my current job. Strange how things work out.)

It used to take a fair bit of jiggery-pokery to set up a Rails development environment on Windows. That’s not the case anymore, thanks to RailsInstaller, a single double-clickable setup program.

Screenshot of Rails installer site

RailsInstaller installs the following on your Windows machine:

I used RailsInstaller to set up my Windows laptop for Rails development this weekend, and it worked like a charm. I took some screenshots along the way and present them below.

Double-clicking on the RailsInstaller executable gives you a familiar welcome window:

RailsInstaller wizard: "Welcome to RailsInstaller!"

Blah blah blah legal stuff. Just give me the software and I’ll worry about compliance later, okay?

RailsInstaller wizard, License Agreement screen

By default, RailsInstaller installs all its software into the C:\RailsInstaller directory, creating it first if necessary. I broke away from the default and instead specified that the software should go into a new directory called C:\Rails, a name that I thought made a little more sense:

RailsInstaller wizard, "Installation Destination and Options" screen

And we’re off!

RailsInstaller wizard, "Installing" screen, with progress bar showing about 1/10 done

Less than two minutes later:

RailsInstaller wizard, "Installing screen", with progress bar about 90% done

And finally:

RailsInstaller wizard, "Completing the RailsInstaller Setup Wizard" screen

With the install wizard complete, we get kicked into command line mode to set up git and SSH:

RailsInstaller wizard, configuring git

And that’s it! I checked to make sure it was working by creating a new Rails app:

Console showing creation a new rails app.

…we have lift-off!

Console showing launch of the newly-created app

The first time you run Rails on Windows, you might get a message from Windows Firewall asking if you’re cool with Ruby communicating with the outside world on private and/or public networks. I said “yes” to both:

Screenshot of the "Windows Firewall has blocked some features of your program" window.

So far, Rails on Windows, as installed by RailsInstaller, has been working like a charm for me.

Links

This article also appears in the Shopify Technology Blog.