My trusty early-2011 15″ MacBook Pro — standard issue at Shopify at the time, and a fabulous parting gift from them — is in the shop again. There’s something going on with its MagSafe daughterboard, or at least I hope it’s just that daughterboard. Daughterboard replacements are relatively cheap, but if it’s the motherboard that’s fried, it might be better for me to buy a new Macbook. Normally, that wouldn’t be so bad a prospect, but money’s a little tight right now.
I still have a 20″ 2007-era iMac with its RAM maxed out to 6GB in my living room. It’ll let me continue with iOS development, but as a desktop unit, it’s stuck at home. My portable unit is a ThinkPad T430, a Core i5 machine that could use a little extra RAM but is otherwise decent. It runs both Ubuntu 12.04 (a.k.a. “Precise Pangolin”) and Windows 8.1 (a.k.a. “Return of the Start Button”). I’ve got Rails 4 installed on the Ubuntu side, but until now, I kept running into roadblocks trying to get it on the Windows side.
Rails was built on and for Unix-y systems, and relies on the features built into them. As a result, it’s not a natural fit for Windows. Luckily for Windows users, there are people who work hard on getting it to work on The Empire’s operating system. It means that when a new Rails release comes out, you have to wait for those people to come up with the magic recipe to make it work on Windows.
If you’ve been waiting for a way to get Rails 4 to work on Windows — even the latest version, Windows 8.1 — that magic recipe exists today, and Jonathan Macdonald shares the recipe in a series of videos! I followed these steps last night, and I’ve now got Rails 4 up and running on Windows 8.1 Pro.
The only difference that’s apparent to me so far is that if you follow these instructions, you have to use MySQL as your database rather than the default SQLite3. I’ve heard of a number of problems getting SQLite3 to work with Rails on Windows, which may be why this is the case. The end result is that if you want to create a new project, you’ll enter a slightly longer command:
rails new your_project_name -d mysql
The recipe has 5 steps, each with its own video:
- Install MySQL
- Install Ruby 2.0
- Install Git (and use it to clone something you need for the next step)
- Build the MySQL gem
- Install Rails
And now, the videos!
Installing Ruby 2.0
Building the MySQL Gem
Installing Rails 4
And once you’re done, go hit Michael Hartl’s Ruby on Rails Tutorial, which is free-as-in-beer, and written for Rails 4!