20

I'm writing a Ruby on Rails app that normally runs on Heroku or a Linux Box, but I'd need to deploy it to a Windows Server as well.

The Server is a 64-Bit Win2008 Server with IIS 7.0 installed, so normally I'd prefer using IIS instead of setting up an Apache next to it.

I just don't know if Ruby/Rails works with IIS? Do Gems work? Is 64-Bit an issue?

I'm thinking of using Ruby 1.9.1 and Rails 2.3.

Michael Stum
  • 177,530
  • 117
  • 400
  • 535

6 Answers6

18

To install Ruby on Rails for IIS 7 64-Bit Windows 2008 Server please use Helicon Zoo

Yaroslav
  • 1,241
  • 10
  • 13
  • 3
    This has a disadvantage: If you have already installed and fine tuned a copy of Ruby, it will not suggest to use it, but will install another one, and moreover, it will put new Ruby into PATH which will break the previous installation. One more thing: Helicon Zoo can install RoR, but can't uninstall it - you'll have to do this manually. – Paul Apr 23 '13 at 17:03
  • Yes, particularly for SQL-Server, you need a specific older version of Ruby, or it won't compile... – Stefan Steiger Dec 06 '16 at 14:26
14

you must like pain because this deployment is going to hurt. I don't know if this is a solution for you, but at my old job we were deploying web apps on windows tablets (over 200 of them) and decided to use virtual box and deploy the app in the vm. One of our old apps on the pc tablets we deployed on windows without iis, just using ruby and rubygems with mongrel as the app server and mysql as the database but it was not pleasurable.

Jed Schneider
  • 14,085
  • 4
  • 35
  • 46
  • 10
    That's actually an interesting idea: Install Hyper-V server and run some Linux in it. I'll keep that in mind as an idea. (PS: I'm a SharePoint developer, so I don't just like pain, I'm actively seeking it...) – Michael Stum Jul 22 '10 at 01:07
  • lemme know if you want to go that route, either myself or my old boss would probably be able to give you some tips. I think we ran into some license issues using the compiled version of virtual box, so we had to compile it from source, which was not a simple process (I think they try to keep it that way). – Jed Schneider Jul 22 '10 at 01:11
5

Microsoft's Web Platform Installer makes it all surprisingly easy! See http://www.helicontech.com/articles/ruby-on-rails-on-windows-in-production/ for details.

Clive Miller
  • 61
  • 1
  • 4
5

There is a way to run RoR on IIS8 via HttpPlatformHandler - described by Scott Hanselman in his post: Announcing: Running Ruby on Rails on IIS8 (or anything else, really) with the new HttpPlatformHandler

Dmitry Pavlov
  • 30,789
  • 8
  • 97
  • 121
3

You can deploy Rails under IIS, it's just very difficult and there's not a lot of documentation. You'll need a special Fast-CGI implementation: http://roriis.codeplex.com/

Also info here: http://mvolo.com/blogs/serverside/archive/2007/02/18/10-steps-to-get-Ruby-on-Rails-running-on-Windows-with-IIS-FastCGI.aspx

Rails under Apache on Windows is a bit easier, but the biggest drawback of a Windows deployment is that you can't use Capistrano to automate deployments. Gems work on Windows. All my experience is 32bit, there might be a 64bit related glitch, but I doubt it.

Terry G Lorber
  • 2,932
  • 2
  • 23
  • 33
0

For work in windows with RoR I do this:

1. Install Ruby and RoR
2. Install NginX (balancing for each thin server launched)
3. Install Thin Server
4. Create a service (on Ruby code) that run each thin server process with each affinity process (cpu0/cpu1...) for example if have a DualCore CPU it will launch 2 Thin Server (different port between those) and set affinity for each one (using PID).
5. Set a windows user with permission to do run that service (like a IIS pool and isolated process concept)

My app is working more than one year continuous and not have any problem with that and I'm Happy.