4

I have spent the last several hours attempting to get Ruby on Rails running on a Windows server with no luck.

At first I tried configuring a test application through IIS7's FastCGI support, but the documentation for this is not very good. I've been following this blog entry, and this one, and this one, and this one but everything seems to be missing major steps, or are out of date. And every article keeps linking back to this Howto from rubyonrails.org that doesn't exist.

The sense that I'm getting is that even if I manage to make this work, IIS' FastCGI isn't good enough to use in a production environment anyway.

So it looks like my best bet is to setup a reverse proxy in IIS that points to Apache & Mongrel/Passenger using ARR and UrlRewrite. Is there anybody else out there stuck deploying a Rails application on a Windows stack? Am I on the right track? Can you give me a better idea of how to configure this?

I believe Plesk already installed an instance of Apache/Tomcat running on this server using a different port, so adding another virtual host shouldn't be difficult; the hardest part seems to be setting up the reverse proxy through IIS.


Addendum

Since posting this, I have gone on to build a virtual server running Linux and serving our Rails products with Apache, Passenger and Ruby Enterprise Edition.

Linux is so easy, cheap and reliable an option that trying to jam the square peg of Rails into the round hole of Windows/IIS is a fool's errand.

The only possible exception to this is if your Windows env. supports Java, and you can use JRuby. By all accounts it is one of the better Ruby implementations. Otherwise, give up and save your sanity.

5 Answers 5

6

Save your sanity!!! RoR for Windows 2008 isn't there yet. Seems like things have barely caught up with Windows 2003. Keep a look out for IronRuby for IIS from Microsoft. It's just not cooked yet though.

Until then, find a TEMPORARY solution. Use mongrel and install the prerelease version of mongrel_service to get it working with W2K8:

http://groups.google.com/group/comp.lang.ruby/browse_thread/thread/1adf2a73c75c2884/38267c06198e282e?show_docid=38267c06198e282e

I did this to get Redmine working and seems like the most solid solution for now. I was able to recover some of my sanity back. I have tried all the articles you found and more. Even tried cooking IronRuby myself and got it to work with RoR basics, but failed with Redmine. Mongrel worked and is extremely fast, not sure if it is scalable though.

1
2

the best bet to get a ROR rails app deployed on windows is to use jruby with the glassfish gem. this setup makes it very easy to use a reverse proxy to proxy requests to glassfish to server the application. i'm actually in the process of writing up instructions for such a task on my blog and used the information contained within the following blog post as a stepping stone.

http://danielhill.com.au/blog/2009/04/running-redmine-on-windows-with-jruby-on-rails-and-glassfish/

since i'm on windows 2003 and iis6, i'm using Managed Fusion as a reverse proxy.

2

Why not run a virtualized instance of a linux os using virtualbox or vmware?

4
  • 2
    Where to start... system overheads? Added technical issues? More configuration? Over-engineering? Performance degradation inside the VM if you have an older server? Lack of memory? Hundreds of reasons. Aug 20, 2009 at 21:49
  • I can't see anything wrong with this suggestion, if the server in question is already running server 2008 then it is powerful enough to run a virtual machine as well.
    – benPearce
    Aug 20, 2009 at 22:33
  • Thanks ben. @FarSeeker Give it a try ... virtualbox does virtualization very well, and ubuntu (hint hint) runs really soundly in it. Aug 31, 2009 at 19:47
  • I'm with FarSeeker on this one. I'm asking if Rails can be run in a Windows Server environment, responding with "use Linux" isn't very helpful. And besides, if you're doing virtualization in Windows Server 2008, HyperV is the obvious choice. Sep 8, 2009 at 16:38
1

here's the link to the Howto on rubyonrails.org article that is broken in all the articles you mentioned:

http://oldwiki.rubyonrails.org/rails/pages/HowToConfigureIIS7

Looks like they moved or started a new wiki server and didn't bother linking to the old one, or somesuch.

The tutorial says to use an older version of ruby (1.8.6), when the newest version (1.9.x) is supposed to be much, much faster. I didn't read the whole thing, but barring any technical issues, be sure to use the latest version of ruby for the best performance.

0

I'm in the same boat. Started with FastCGI and had problems. Changed direction and tried ARR, but was never able to find solid documentation and both attempts resulted in failure (one in something closer to disaster).

I actually landed on this because I'm going to attempt this with ARR one more time. I will say that, in the past, I have used Apache to serve RoR, and it has worked great. In my last environment that required IIS because of ASP.NET apps, I used Apache to direct traffic between my static content hosted with Apache, my .NET apps hosted with IIS, and my rails apps hosted on a set of mongrel instances. That setup has worked very well for me, but now I'm working with an environment where the primary purpose is a .NET website hosted on IIS 7.5, and I've been very disappointed with the amount of information available to set this up properly.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .