views:

223

answers:

2

I'm trying to get a Rails app built with IronRuby running on IIS 7. I followed all the tutorial given on the IronRuby site but I can't seem to get it to work. The app runs fine hosted under WebBrick but IIS doesn't seem to host it properly. Here is the page I get.

Error: exit

C:/repositories/RampUp/ruby/RampUp/config/boot.rb:66:in `exit': exit (SystemExit)
    from C:/repositories/RampUp/ruby/RampUp/config/boot.rb:66:in `load_rails_gem'
    from C:/repositories/RampUp/ruby/RampUp/config/boot.rb:54:in `load_initializer'
    from C:/repositories/RampUp/ruby/RampUp/config/boot.rb:38:in `run'
    from C:/repositories/RampUp/ruby/RampUp/config/boot.rb:11:in `boot!'
    from C:/repositories/RampUp/ruby/RampUp/config/boot.rb:110
    from C:/repositories/RampUp/ruby/RampUp/IronRuby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
    from C:/repositories/RampUp/ruby/RampUp/IronRuby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
    from C:/repositories/RampUp/ruby/RampUp/config/environment.rb:7
    from C:/repositories/RampUp/ruby/RampUp/IronRuby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
    from C:/repositories/RampUp/ruby/RampUp/IronRuby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
    from (eval):1
    from C:/repositories/RampUp/ruby/RampUp/IronRuby/Lib/ironruby/gems/1.8/gems/rack-1.2.1/lib/rack/builder.rb:46:in `instance_eval'
    from C:/repositories/RampUp/ruby/RampUp/IronRuby/Lib/ironruby/gems/1.8/gems/rack-1.2.1/lib/rack/builder.rb:46:in `initialize'
    from (eval):0
    from IronRuby.Rack:0:in `Rackup'
    from IronRuby.Rack:0:in `.ctor'
    from IronRuby.Rack:0:in `GetHandler'
    from System.Web:0:in `System.Web.HttpApplication.IExecutionStep.Execute'
    from System.Web:0:in `ExecuteStep'
    from System.Web:0:in `ResumeSteps'
    from System.Web:0:in `BeginProcessRequestNotification'
    from System.Web:0:in `ProcessRequestNotificationPrivate'
    from System.Web:0:in `ProcessRequestNotificationHelper'
    from System.Web:0:in `ProcessRequestNotification'
    from System.Web:0:in `MgdIndicateCompletion'
    from System.Web:0:in `ProcessRequestNotificationHelper'
    from System.Web:0:in `ProcessRequestNotification'


Search paths

C:/repositories/RampUp/ruby/RampUp/IronRuby/Lib/ironruby/gems/1.8/gems/activerecord-2.3.8/bin
C:/repositories/RampUp/ruby/RampUp/IronRuby/Lib/ironruby/gems/1.8/gems/activerecord-2.3.8/lib
C:/repositories/RampUp/ruby/RampUp/IronRuby/Lib/ironruby/gems/1.8/gems/activesupport-2.3.8/bin
C:/repositories/RampUp/ruby/RampUp/IronRuby/Lib/ironruby/gems/1.8/gems/activesupport-2.3.8/lib
C:/repositories/RampUp/ruby/RampUp/IronRuby/Lib/ironruby/gems/1.8/gems/rake-0.8.7/bin
C:/repositories/RampUp/ruby/RampUp/IronRuby/Lib/ironruby/gems/1.8/gems/rake-0.8.7/lib
C:/repositories/RampUp/ruby/RampUp
C:/repositories/RampUp/ruby/RampUp/IronRuby/Lib/ironruby/gems/1.8/gems/rack-1.2.1/bin
C:/repositories/RampUp/ruby/RampUp/IronRuby/Lib/ironruby/gems/1.8/gems/rack-1.2.1/lib
C:/repositories/RampUp/ruby/RampUp/IronRuby/lib/IronRuby/
C:/repositories/RampUp/ruby/RampUp/IronRuby/lib/ruby/site_ruby/1.8/
C:/repositories/RampUp/ruby/RampUp/IronRuby/lib/ruby/1.8/
.

Gem paths

C:/repositories/RampUp/ruby/RampUp/IronRuby/Lib/ironruby/gems/1.8
C:/repositories/RampUp/ruby/RampUp/IronRuby/lib/ironruby/gems/1.8

Here is my web.config

<?xml version="1.0"?>
<configuration>
  <configSections>
    <section name="microsoft.scripting" type="Microsoft.Scripting.Hosting.Configuration.Section, Microsoft.Scripting" requirePermission="false"/>
  </configSections>
  <system.webServer>
    <handlers>
      <clear/>
      <add name="IronRuby" path="*" verb="*" type="IronRuby.Rack.HttpHandlerFactory, IronRuby.Rack" resourceType="Unspecified" requireAccess="Read" preCondition="integratedMode"/>
    </handlers>
  </system.webServer>
  <system.web>
    <!-- make this true if you want to debug any of the DLR code, IronRuby.Rack, or your own managed code -->
    <compilation debug="false"/>
  </system.web>
  <microsoft.scripting debugMode="true">
    <languages>
      <language names="IronRuby;Ruby;rb" extensions=".rb" displayName="IronRuby 1.0" type="IronRuby.Runtime.RubyContext, IronRuby, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
    </languages>
    <options>
      <set language='Ruby' option="LibraryPaths" value=";..\IronRuby\lib\IronRuby\;..\IronRuby\lib\ruby\site_ruby\1.8\;..\IronRuby\lib\ruby\1.8\"/>
    </options>
  </microsoft.scripting>
  <appSettings>
    <add key="AppRoot" value="..\."/>
    <add key="Log" value="ironrack.log"/>
    <!-- <add key="GemPath" value="..\..\..\..\External.LCA_RESTRICTED\Languages\Ruby\ruby-1.8.6p368\lib\ruby\gems\1.8"/> -->
    <add key="GemPath" value="..\IronRuby\Lib\ironruby\gems\1.8"/>
    <add key="RackEnv" value="development"/>
  </appSettings>
</configuration>

and my config.ru file

# RAILS_ROOT/config.ru
require "config/environment"

ENV['RAILS_ENV'] = 'development'

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

I'm not sure what I am doing wrong. Any suggestions?

+1  A: 

Finally got it. I had to uninstall Rails 2.3.8 and Rack 1.1 and install Rails 2.3.5 and Rack 1.0.1 I guess the version of IronRuby I'm running (1.0) has issues with the newer version of rails. Anyways It worked after I did that.

Adam
A: 
I had the same problem. Turns out the latest version of IronRack is not compatible with rack 1.0.1 used by rails 2.3.5.
Marnix van Valen