Search Wiki:
The Ruby on Rails (ROR) framework is typically run under Apache on both Linux and Windows Systems. For those that do not wish to use Apache to host their solutions on windows, one alternative is running under Internet Information Services (IIS) World Wide Web Publishing (W3SVC) service.

The installer packages Shane Careveo's Fast-CGI ISAPI filter, Ionic's Rewrite ISAPI filter, SQL Server support for rails and my IIS configuration scripts to allow for seamless integration of your Ruby On Rails web application with Microsoft's IIS web server on Windows XP or Windows Server 2003 (32-bit and 64-bit).

This is the most complete solution for hosting your Ruby Rails application under IIS.

The installer is compiled using the Nullsoft Installer System (NSIS). IIS setup is handled by my jscript file which leverages the ADSI API and is executed from the installer. It installs the Rewrite filter, FCGI filter (including registry config settings), Ruby FCGI bindings and configures the IIS website.

Questions or comments? Please use the discussions.

News:
04 Jun 2007 - Making Rails HTTP Status codes return properly to IIS clients.
20 Feb 2007 - Version 1.0.5 has been released!
As always, feedback is appreciated!

Important Please Read This: You must override the ActionController AbstractRequest class's request_uri method, otherwise your application will not work properly! If you run the installer, you can also find the documentation in the IIS_Configuration.html under the installation path/documentation. I am also adding it here for a quick reference: Documentation For Modifying The request_uri Method.

Coming soon: Documentation for setting up multiple rails apps side-by-side.

Documentation:
Required Procedure: Documentation For Modifying The request_uri Method
Rails bug Fix: Making Rails HTTP Status codes return properly to IIS clients.
Documentation for Manually Configuring IIS Fast-CGI For Ruby On Rails (work in progress)
Documentation and sample files for Ruby Test Integration With CruiseControl.net

Links:
Ruby on Rails
Ionic's Isapi Rewrite for IIS (used by this project)
Shane Careveo's
Last edited Sep 20 2007 at 11:36 PM  by bheinz, version 27
Comments
dorjem wrote  Feb 11 2007 at 10:33 PM  
Brent,
Many thanks for this great tool - I've used to great effect earlier in late Jan 2007 to get multiple RAILS applications running on IIS.
I've documented what I did here because I couldn't find anything that had all the detail, and so I can reference it again in the future.
http://dorjem.blogspot.com/2007/02/to-setup-rails-on-iis-and-enable-it-for.html
DorjeM

cocentaina wrote  Feb 16 2007 at 2:39 PM  
The installation doesn't work for me. It gives me only two directories (Documentation and Scripts) under RORForIISFCGI, containing html, js, ini and rb files. For some reason it skips the dll files (i can see "skipped" in the installer), but it doesn't leave a log file, so I can't tell more...

bheinz wrote  Feb 20 2007 at 3:41 PM  
This only affects 32bit OS installs and has been fixed in 1.0.5. Thanks for reporting this!

chaochou2 wrote  Mar 22 2007 at 2:27 PM  
I attempted an install and get a message "Invalid Ruby installation path selected" on the Ruby Install Path page. I am on Windows XP 32bit. I have tried many paths on different drives and rebooting; no effect. Any ideas?

bheinz wrote  Mar 28 2007 at 11:13 PM  
The installer looks for the existence of file %rubypath%\bin\rubyw.exe where %rubypath% is the path to your ruby installation (typically c:\ruby) so verify the file c:\ruby\bin\rubyw.exe exists, if it does exist, please add a new issue in the event tracker with as many details as you can add about your configuration. Thanks, Brent

thatsteve wrote  May 24 2007 at 3:40 PM  
I hate to rain on your parade, however the skipped .dll problem is still occuring. Windows Server 2000, fully patched, using the ROR4IISFCGI_1.0.5.exe executable. Is there someplace else I could get these files? I'm willing to configure the whole deal manually, if that's what it takes.

bheinz wrote  Jun 4 2007 at 8:30 PM  
Thanks for the bug report. If you read the project's description, it currently only supports Windows XP or Server 2003 OS. Unfortunately I do not plan on supporting Windows 2000. However, all of the necessary files can be aquired online and manually put in place to the proper locations. Please look in the links section above to download the appropriate files. You can get the c++ runtime binaries from microsoft. Brent

mjc wrote  Sep 11 2007 at 9:43 AM  
Hi, I'm running server 2003, fully patched, and I'm seeing exactly the same problem with 1.0.5 :(

rleblic wrote  Nov 6 2007 at 11:30 AM  
Thank you very much, it works like a charm on Server 2003...

evanmcd wrote  Nov 30 2007 at 11:23 PM  
Hey, thanks for this very helpful article. I've made it _almost_ all the way there. Although my app is running fine in Webrick, I get a 401.3 Access Denied error when going through IIS. I've gone through the documentation again and have followed all the steps regarding permissions. Used Filemon, but nothing much in there - no access denied, just a buffer overflow (which seems to be quite common when looking at Filemon output) on dispatch.fcgi, which has the proper permissions. Any idea what could be going on? Thanks again.

bheinz wrote  Jan 16 at 1:03 AM  
Evan, please see my response to your thread under discussions.

Updating...