New to Rails 3? Check out the Ruby on Rails 3 Tutorial book and screencast.

A book and screencast series showing you how to develop and deploy industrial-strength Rails apps in a direct, step by step way. The screencast series includes 12 lessons over more than 15 hours! Get the best "over the shoulder" experience of following what a top Rails 3 developer does when building an app today. Click here to learn more.

Setting Up a Rails Development Environment on Windows

In Elsewhere, Tutorials

Fabio Akita has put together a comprehensive walkthrough blog post on setting up a Rails development environment on Windows. This isn't particularly tricky in any case, but Fabio presents some good practices that only become apparent through experience (of which Fabio has a lot!) There's also a version in Portuguese.

As well as installing Ruby and Rails, Fabio covers installing RMagick, git, gVim, SQLite3, and setting up your command prompt console, as well as other resources you should check out once you're done.

Support from: acts_as_conference; - A two day Rails conference in Orlando, Florida on February 6 and 7. Only $125, free food, a great venue, and lots of top Rails speakers including DHH. Click here to learn more.

Post to Twitter Tweet This Post

Vaguely Related Posts (Usually)

8 Comment Responses to “Setting Up a Rails Development Environment on Windows”

  1. #1
    AkitaOnRails Says:

    Hi Peter, thanks for the article, I hope these tips help Windows users to grasp the potential of Rails development.

  2. #2
    McNaz Says:

    Excellent writeup Akita!

    This is a good way to get new Windows developers interested in Ruby.

    Sadly, Ruby development under Windows is very painful for several reasons:

    1. Ruby runs much much slower under Windows than it does under either of Linux or OSX.

    2. You will be missing out on some gems that require native compilation (Hpricot and RedCloth 4.x for example)

    3. If you are a Git fan then Git is a second class citizen under Windows and its implementation is not as robust as it is in either of Linux or OSX.

    4. You loose out on Capistrano. Capistrano will work under Cygwin, however.

    5. Windows is a Mickey Mouse operating system ;)

    Okay, maybe the last point was unnecessary!

    My point is that Ruby is a wonderful development platform. Windows based developers should use this guide to get started but should also know that Ruby's full potential is best realized under a proper operating system (here I go again!) like Linux or OSX. Otherwise be prepared for a world of PAIN and FAIL, mainly due to Windows and not Ruby.

    Ubuntu, on the other hand, can be configured to run Ruby in about a dozen command lines (for the whole Rails stack, plus all the yummy Gems, databases, editors, etc...).

  3. #3
    Lee Smith Says:

    @McNaz

    +1 for the Ubuntu setup...dead simple if you know the first thing about apt-get.

    I just don't understand the myth that you HAVE to have a $2200 Macbook Pro with Textmate to be proficient in Rails development...

  4. #4
    AkitaOnRails Says:

    @McNaz as I said, Windows developers that needs to use Windows, does that for a number of reasons and are well aware that they could go to Ubuntu or other Linux distro. So, keeping this out of the way:

    1. you are right, Ruby on Windows is slower. Luis Lavena is working on this and the experimental compilation using MingW is way faster than now. We will see big improvements soon.
    2. if you use the --platform=mswin32 option in the gem installer, it will retrieve the correct gem. RedCloth has a mswin32 counterpart, for instance, Hpricot as well.
    3. The msysGit version is actually pretty good, I've used it a bit and I can't say that it is bad. It is the same 1.6.1 code base as the Linux counterpart and works as advertised.
    4. You don't necessarily lose Capistrano. You obviously can't use a Windows box as the deployment server, but you certainly can use a Windows client to deploy to a Unix box. There may be a glitch or two, but nothing that's not avoidable by a good enough Rubyst.
    5. No comments on that :-) I am a Mac user.

    Please keep this in mind: there are several circunstances that keep people locked to Windows. Specially if this person works for a closed minded company that won't allow him to use Ubuntu. The instant you tell this person "give up, Ruby is unable to be used under Windows", you lose the single person that could actually bootstrap Ruby adoption inside this company. People have to start somewhere and sometimes Windows is this way. So let's help them get started and one of three things will happen: 1) he will be super happy and will evangelize Ruby to his peers, leading to mass adoption on this company; 2) he will lose hope on his employer and will try to find another job; 3) he will simply give up and none of us lose nothing.

  5. #5
    Mike Woodhouse Says:

    @McNaz: Hpricot (I have 0.6.164) and RedCloth (4.1.1) run just fine on Windows, thank goodness - I make very good use of them every day.

    Beyond that, for those of us unwilling or unable to change jobs and unwilling or unable to change or OS environment, as long as we never, ever, ever, use a Mac or install a *nix environment, how would we know or care that we're missing out? :-)

    Git? I've only just got us on to SVN. Git can wait - the enterprise doesn't run that fast. Not out 80,000-employee one, at least.

    I think it would be nice to be able to run Capistrano, though. Deploying from a Windows development box to a MOLAR (Mongrel/Oracle/Linux/Apache/Rails!) stack can get a bit hairy.

  6. #6
    AkitaOnRails Says:

    @Mike as I said: you actually can run Capistrano from a Windows box to deploy to a "MOLAR" server. It can have a couple of glitches, but overall, it should work ok.

  7. #7
    McNaz Says:

    @Akita & Mike

    Thanks for the very informative replies. It is indeed encouraging to know that alot of people have put in quite an effort to make all these gems/libraries/etc work on Windows. Good job.

    I wonder if Cygwin is worth a mention as well, as it is another possible Windows friendly environment that supports Ruby rather nicely (except for the mentioned performance issues).

    It is also worth mentioning that the E-Text Editor (commercial but very reasonably proiced) works rather nicely with Cygwin to bring a TextMate like environment (including TM bundles) to Windows.

  8. #8
    Peter Booth Says:

    Thanks for the information here. As a five-year, part-time Ruby/Mac user it's been a challenge to return to working in a Windows shop. I'd love to see greater market penetration of my preferred stack but that isn't a reason to call Windows a Mickey-Mouse OS. That just loses a potential audience.

Leave a Reply