Ivan, did you ever figure this out? The problem is that rails-2.3.5 ships with 
a private copy of rack-1.0.1. However, if you have the latest version of rack 
installed too (rack-1.1.0), IronRuby.Rack by default will load the latest 
version >=1.0.0 (meaning 1.1.0), but then rails will fail to load its own copy 
when booting. To prevent this, install rack-1.0.1 and force it to be loaded by 
IronRuby.Rack by specifying the “RackVersion” in web.config’s appSettings:

<add key="RackVersion" value="=1.0.1" />

WRT the public folder, I prefer a slightly different solution: config.ru and 
web.config in the same directory, but web.config will have an option for 
telling IronRuby.Rack what folder it should serve static content out of, and by 
default it will be “public”. I wouldn’t consider web.config static content, so 
I’d prefer keeping it out of the public folder.

In fact, the version of IronRuby.Rack in GIT does not support requesting static 
files at all, as all requests are routed through IronRuby.Rack and nowhere does 
it say “if requested file exists: serve it and finish request”. If you’ve run a 
rails app through IronRuby.Rack and haven’t seen images, that’s why, but will 
be fixed once we push new bits to GIT.

~js

From: ironruby-core-boun...@rubyforge.org 
[mailto:ironruby-core-boun...@rubyforge.org] On Behalf Of Ivan Porto Carrero
Sent: Wednesday, March 10, 2010 1:05 PM
To: ironruby-core@rubyforge.org
Subject: Re: [Ironruby-core] ironruby.rack patch

But I still wasn't able to run my rails app from IIS.

I modified my IronRuby.Rack version to have web.config etc in the public folder 
but config.ru<http://config.ru> in the rackup folder. That's the way passenger 
does it too and that makes absolute paths for images, stylesheets etc will work 
out better.

But regardless of what I use the original code + the earlier sent patch. Or the 
one that starts in public I get this error when it's trying to run a rails app

http://gist.github.com/328343

Any help/pointers you can give me would be greatly appreciated
---
Met vriendelijke groeten - Best regards - Salutations
Ivan Porto Carrero
Web: http://whiterabbitconsulting.eu - http://flanders.co.nz
Twitter: http://twitter.com/casualjim
Author of IronRuby in Action (http://manning.com/carrero)
Microsoft IronRuby/C# MVP

On Wed, Mar 10, 2010 at 8:24 PM, Jimmy Schementi 
<jimmy.scheme...@microsoft.com<mailto:jimmy.scheme...@microsoft.com>> wrote:
Thanks! I’ve already added something equivalent, but haven’t checked it in; 
I’ll get to it soon. For anyone else who needs this, just apply Ivan’s patch 
for now.
From: 
ironruby-core-boun...@rubyforge.org<mailto:ironruby-core-boun...@rubyforge.org> 
[mailto:ironruby-core-boun...@rubyforge.org<mailto:ironruby-core-boun...@rubyforge.org>]
 On Behalf Of Ivan Porto Carrero
Sent: Wednesday, March 10, 2010 7:46 AM
To: ironruby-core
Subject: [Ironruby-core] ironruby.rack patch

HI

I needed IronRuby.Rack today so I patched it to work without GetExecutionContext

the patch is attached
---
Met vriendelijke groeten - Best regards - Salutations
Ivan Porto Carrero
Web: http://whiterabbitconsulting.eu - http://flanders.co.nz
Twitter: http://twitter.com/casualjim
Author of IronRuby in Action (http://manning.com/carrero)
Microsoft IronRuby/C# MVP

_______________________________________________
Ironruby-core mailing list
Ironruby-core@rubyforge.org<mailto:Ironruby-core@rubyforge.org>
http://rubyforge.org/mailman/listinfo/ironruby-core

_______________________________________________
Ironruby-core mailing list
Ironruby-core@rubyforge.org
http://rubyforge.org/mailman/listinfo/ironruby-core

Reply via email to