Friday, October 20, 2006

Setting up Rails on IIS

I am having trouble getting Rails running in IIS. I will be updating this post as I progress, until I have it working, and have documented EXACTLY how I did it.

My current setup:
Windows Server 2003 with all updates.
IIS 6.0
Rails 1.1.6
Ruby 1.8.4 (One Click Installer)
RubyForIIS 0.1 (The install is broken by default I think... Copy all files and folders from C:\ruby\RubyForIIS to the C:\ruby\lib\ruby\site_ruby\1.8 folder)

Rails apps are currently working using Webrick or Mongrel as the web server. I was also successful in getting IIS to proxy Mongrel. This allowed for SSO (Single Sign On via active directory services) but I was unable to access the request.env['AUTH_USER'] IIS server environment variable from within Mongrel. Since this is a requirement of the app, I have had to start over.

This will be a rails app server purely by IIS... Wish me luck.

I have followed the several tutorials that I have found by searching Google, and all have failed me. Though I did get to a 'Server Error - Cannot connect to FCGI Server' point where it was at least creating Ruby session files.

So for my next experiment I am going to roll my own recipe and bake it til it is golden brown at the edges.

3 hashings:

Galtzo said...

Think not that I have been ignoring this post... Nay, think that I have been working on finding a solution!

So here are several updates:

From the Rails end:
http://groups.google.com/group/rubyonrails-core/browse_thread/thread/b88ad36ddd82477e
http://groups.google.com/group/rubyonrails-talk/browse_thread/thread/77c9275792d961b3

From the IIS end:
http://forums.iis.net/thread/1461925.aspx
http://forums.iis.net/thread/1448886.aspx

Ryan Barton said...

After a lot of missteps, I have been able to access the AUTH_USER environment variable through proxying from IIS to Mongrel. See my edit on the Rails Wiki. Hope this is useful...

Galtzo said...

I have new posts on this topic. I never got IIS to serve rails entirely satisfactorily (though the IIS team is still at work on that aspect), but I did get it to proxy Mongrel satisfactorily...

http://galtzo.blogspot.com/2007/03/ftgu-rails-on-windows-mongrel-proxied.html
http://galtzo.blogspot.com/2007/03/ftgu-rails-on-windows-single-sign-on.html

This blog began on Monday, September 27, 2004.
Hits since 2/20/2007:
free hit counters
free hit counters