2010-04-15 15 views
5

Chiunque gioca con ironruby?Utilizzo di rotaie in esecuzione su IronRuby Rack

Ho ottenuto con successo il progetto IronRuby.Rails.Example in esecuzione sul mio computer locale in IIS 5.1. Ora sto tentando di far funzionare il mio sito di binari demo nello stesso modo.

My web.config è leggermente diverso dal progetto di esempio. Sto tentando di utilizzare solo ciò che è stato distribuito con IronRuby 1.0 e quello che ho installato usando le gemme.

sto ottenendo il seguente errore che non mi danno un sacco di andare su:

D: /demo/config/boot.rb: 66: in `uscita ': uscita (SystemExit)

Dopo aver provato molte cose diverse, penso che stia avendo un problema nel trovare gemme. Ho allegato la mia configurazione web e ironrack.log. Qualcuno ha dei suggerimenti su cosa sto facendo male?

Grazie!

<?xml version="1.0"?> 
<configuration> 
    <configSections> 
     <!-- custom configuration section for DLR hosting --> 
     <section name="microsoft.scripting" type="Microsoft.Scripting.Hosting.Configuration.Section, Microsoft.Scripting" requirePermission="false"/> 
    </configSections> 
    <system.webServer> 
     <handlers> 
      <!-- clear all other handlers first. Don't do this if you have other handlers you want to run --> 
      <clear/> 
      <!-- This hooks up the HttpHandler which will dispatch all requests to Rack --> 
      <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="true"/> 
    <httpHandlers> 
     <!-- clear all other handlers first. Don't do this if you have other handlers you want to run --> 
     <clear/> 
     <!-- This hooks up the HttpHandler which will dispatch all requests to Rack --> 
     <add path="*" verb="*" type="IronRuby.Rack.HttpHandlerFactory, IronRuby.Rack" /> 
    </httpHandlers> 
    </system.web> 
    <!-- DLR configuration. Set debugMode to "true" if you want to debug your dynamic language code with VS --> 
    <microsoft.scripting debugMode="false"> 
     <options> 
      <!-- Library paths: make sure these paths are correct --> 
      <!--<set option="LibraryPaths" value="..\..\..\Languages\Ruby\libs\; 
                ..\..\..\..\External.LCA_RESTRICTED\Languages\Ruby\ruby-1.8.6p368\lib\ruby\site_ruby\1.8\; 
                ..\..\..\..\External.LCA_RESTRICTED\Languages\Ruby\ruby-1.8.6p368\lib\ruby\1.8\"/>--> 
      <set option="LibraryPaths" value="C:\IronRuby\lib\IronRuby;C:\IronRuby\lib\ruby\1.8;C:\IronRuby\lib\ruby\site_ruby;C:\IronRuby\lib\ruby\site_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="C:\IronRuby\Lib\ironruby\gems\1.8\gems"/> 
     <add key="RackEnv" value="production"/> 
    </appSettings> 
</configuration> 

=== Booting ironruby-rack at 4/15/2010 1:27:12 PM [DEBUG] >>> TOPLEVEL_BINDING = binding 
=> Setting GEM_PATH: 'C:\\IronRuby\\Lib\\ironruby\\gems\\1.8\\gems' 
=> Setting RACK_ENV: 'production' 
=> Loading RubyGems [DEBUG] >>> require 'rubygems' 
=> Loading Rack >=1.0.0 [DEBUG] >>> gem 'rack', '>=1.0.0';require 'rack' 
=> Loaded rack-1.1 
=> Application root: 'D:\\demo' 
=> Loading Rack application [DEBUG] >>> Rack::Builder.new { (
    require "config/environment" 

    ENV['RAILS_ENV'] = 'development' 

    use Rails::Rack::LogTailer 
    use Rails::Rack::Static 
    run ActionController::Dispatcher.new 
    ) }.to_app exit 
    D:/demo/config/boot.rb:66:in `exit': exit (SystemExit) 
     from D:/demo/config/boot.rb:66:in `load_rails_gem' 
     from D:/demo/config/boot.rb:54:in `load_initializer' 
     from D:/demo/config/boot.rb:38:in `run' 
     from D:/demo/config/boot.rb:11:in `boot!' 
     from D:/demo/config/boot.rb:110 
     from C:/IronRuby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require' 
     from C:/IronRuby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require' 
     from D:/demo/config/environment.rb:7 
     from C:/IronRuby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require' 
     from C:/IronRuby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require' 
     from (eval):1 
     from C:/IronRuby/lib/ironruby/gems/1.8/gems/rack-1.1.0/lib/rack/builder.rb:46:in `instance_eval' 
     from C:/IronRuby/lib/ironruby/gems/1.8/gems/rack-1.1.0/lib/rack/builder.rb:46:in `initialize' 
     from (eval):0 
     from D:\Dev\ironruby\ironruby-ironruby-20bc41b\Merlin\Main\Hosts\IronRuby.Rack\RubyEngine.cs:52:in `Execute' 
     from D:\Dev\ironruby\ironruby-ironruby-20bc41b\Merlin\Main\Hosts\IronRuby.Rack\RubyEngine.cs:45:in `Execute' 
     from D:\Dev\ironruby\ironruby-ironruby-20bc41b\Merlin\Main\Hosts\IronRuby.Rack\Application.cs:68:in `Rackup' 
     from D:\Dev\ironruby\ironruby-ironruby-20bc41b\Merlin\Main\Hosts\IronRuby.Rack\Application.cs:32:in `.ctor' 
     from D:\Dev\ironruby\ironruby-ironruby-20bc41b\Merlin\Main\Hosts\IronRuby.Rack\HttpHandlerFactory.cs:37:in `GetHandler' 
     from System.Web:0:in `MapHttpHandler' 
     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 `System.Web.IHttpAsyncHandler.BeginProcessRequest' 
     from System.Web:0:in `ProcessRequestInternal' 
     from System.Web:0:in `ProcessRequestNoDemand' 
     from System.Web:0:in `ProcessRequest' 

risposta

3

exit è il modo per chiudere programmaticamente in ruby.

L'idea alla base di rack è che si tratta di un middleware tra i framework Web di ruby ​​e l'effettivo server delle app. Disaccoppiandolo, lascia che la miriade di framework rubino (rotaie, sinatra, ramaze, ecc.) Puntino a un'unica interfaccia, e la miriade di app server (bastardo, apache con passeggero, unicorno, ecc.) Fanno lo stesso. Quello che sembra è che i ragazzi IR stanno cercando di ottenere rack lavorando con IIS. Ho fatto un rapido googling per le guide su configurazione rack e ho trovato this page

l'output è simile a quello che si vede nel metodo del server di rotaie. Vorrei provare a capire da dove proviene il numero

require "config/environment" 

ENV['RAILS_ENV'] = 'development' 

use Rails::Rack::LogTailer 
use Rails::Rack::Static 
run ActionController::Dispatcher.new 
) }.to_app exit 

e provare a renderlo più vicino a ciò che è in quella guida. Se non riesci ad averlo lì, proverei a postare sulla mailing list IR. Tendono ad essere abbastanza amichevoli, e poiché questa è una cosa marginale al momento, potrebbero essere gli unici con abbastanza esperienza da aiutare.

Buona fortuna :-)

+0

eri totalmente sulla strada giusta. Ho installato entrambe le gemme della versione 1.0.1 e 1.1.0 di Rack. Ho disinstallato 1.1.0 e ora sto passando a un errore di routing .. quindi sembra che io sia di nuovo sul percorso verso l'illuminazione. – NotMyself

+0

dolce, felice di essere stato in grado di aiutare :) –

+0

@NotMyself - Sembra che io sia sulla stessa strada di te; Mi sono imbattuto per la prima volta nel problema di "uscita" e disinstallare la versione 1.1.0 lo ha risolto anche per me. Sei riuscito a capire l'errore di routing? –

Problemi correlati