I just spent the last two days trying to get Rails on IIS to work with
Windows 2003/IIS 6.0. I think I’ve finally got it working, but it took
more googling than I care to describe. Now I’ve got a few questions:
- Is there some ‘official’ Rails on IIS guide on this site on another
official ruby site that’s known to work well? - If not, can someone make one using my links/notes below?
- What is the latest version of request.rb with the necessary hack for
IIS that actually works? (see notes below).
My notes/links:
-
This was the best tutorial I found:
http://made-of-stone.blogspot.com/2006/01/rails-on-iis-revisited.html.
It was incomplete though. Use my notes below as well. Also, it didn’t
really describe how to install rails in /vendor, so I just
modified request.rb in C:\ruby… Note that the mods are the ones I
described below. If you’ve got a recent version of rails, your
requests.rb will be the same as in this tutorial but still won’t work. -
I kept getting 403 errors until I followed these instructions
(http://www.beamartyr.net/articles/iisperl.html) for setting up Perl
with IIS. Basically, you give the user account some extra user rights. -
Don’t forget to make all the dll’s and .exe’s described executable to
whatever user your IIS app pool is running as, and make the
IconicIsapiRewrite and /log directories writeable. -
Even though I just downloaded my version of Rails (1.1.0 per
scripts/about) using gems, and the file notes that it includes an IIS
hack, I had to modify request.rb as described here at
http://colinramsay.co.uk/diary/archives/000297.html. What’s more, even
that didn’t work. I had to replace the return (uri) in request_uri with
‘uri.sub(/^///, “/”)’.