Monday, March 15, 2010

IIS + Ruby & Rails

I've been trying to get Rails up and and running on IIS and have had trouble finding good documentation on how to accomplish that using IronRuby.Rack. Recently Ivan Puerto Carrero posted a reply on the IronRuby mailing list describing how to get it working. I'm sharing that post here to add more visibility to the solution and will be giving it a try tonight. Hope this helps others find their way through the IIS/Ruby adventure.



Date: Sun, 14 Mar 2010 20:38:05 +0100
From: Ivan Porto Carrero
To: ironruby-core@rubyforge.org
Subject: Re: [Ironruby-core] IIS + IronRuby

but what I did was create a new solution in visual studio
Added references to the files from the ironruby rc3 distribution
Add the files from Merlin\Main\Hosts\IronRuby.Rack\*.cs to the solution

Applied this patch

compiled as release

Added a bin folder to my public folder and copied the resulting assemblies there.

Added a web.config much like this one. But I changed the values of LibraryPaths and GemPath to point to my ironruby install based on C:\ironruby\

I also changed the value of AppRoot to ..

and my config.ru in the RAILS_ROOT contains:

ENV['RAILS_ENV'] = 'production'
require "config/environment"

use Rails::Rack::LogTailer
use Rails::Rack::Static
run ActionController::Dispatcher.new

That should make your application work on IIS but there is still an open problem around it not serving the images.

No comments:

Post a Comment