2010-04-15 6 views
5

ironruby로 게임을하는 사람은 누구입니까?IronRuby 랙에서 레일 애플리케이션 실행하기

IIS 5.1에서 로컬 시스템에서 IronRuby.Rails.Example 프로젝트를 성공적으로 실행했습니다. 나는 지금 나 자신의 데모 레일 사이트를 같은 방식으로 실행하려고 시도 중이다.

내 web.config는 예제 프로젝트와 약간 다릅니다. IronRuby 1.0과 함께 배포 된 항목과 내가 보석을 사용하여 설치 한 항목 만 사용하려고합니다.

D : /demo/config/boot.rb : 66 : '출구'에서 : 출구 (SystemExit없이

나는 나에게에 갈 많이 제공하지 않습니다 다음과 같은 오류를 얻고있다)

많은 다른 것들을 시도한 후에 나는 보석을 찾는 데 문제가 있다고 생각합니다. 나는 나의 웹 설정과 ironrack.log를 첨부했다. 누구든지 내가 뭘 잘못하고있는 포인터가 있습니까?

감사합니다.

<?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' 

답변

3

exit은 프로그래밍 방식으로 루비에서 종료하는 방법입니다.

랙의 아이디어는 루비 웹 프레임 워크와 실제 앱 서버 사이의 미들웨어입니다. 이것을 분리함으로써 무수히 많은 루비 프레임 워크 (레일, 시낫 트라, 라 메즈 등)가 단일 인터페이스를 목표로하고 무수한 앱 서버 (잡종, 승객과 아파치, 유니콘 등)가 동일하게 작동합니다. IR 직원들은 IIS로 작업하기 위해 노력하고 있습니다. 난 랙 구성에 대한 레일에 대해 빠른 검색을 수행 한 결과를 this page

과 비슷한 모양으로 레일 서버 메소드에서 볼 수있는 것과 유사하게 보입니다. 나는이

require "config/environment" 

ENV['RAILS_ENV'] = 'development' 

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

어디에서 오는가 알아 내기 위해 노력하고 가이드에 무엇에 그것을 가까이 만들려고합니다. 당신이 거기에 그것을 얻을 수 없다면, 나는 IR 메일 링리스트에 게시하려고합니다. 그들은 상당히 친절한 경향이 있으며, 이것은 현재 그와 같은 외설적 인 것이기 때문에, 그들은 충분한 전문 지식을 가진 유일한 사람들 일 것입니다.

+0

행운 :-) 당신은 옳은 길을 완전히 있었다. 저는 Rack 버전 1.0.1과 1.1.0 보석을 모두 설치했습니다. 1.1.0을 제거한 후 라우팅 오류가 발생했습니다. 이제 다시 enlighenment 경로에있는 것 같습니다. – NotMyself

+0

달콤한, 다행 내가 도울 수 있었던 :) –

+0

@ NotMyself - 그것은 당신과 같은 경로에있어 보인다; 나는 먼저 'exit'문제에 부딪혔다. 1.1.0을 제거하면 나에게도 문제가 해결되었다. 라우팅 오류를 파악할 수 있었습니까? –

관련 문제