ショットガンの逸品が炸裂した場合、そのシナトラのwindowsアプリケーション

StackOverflow https://stackoverflow.com/questions/1844188

  •  12-09-2019
  •  | 
  •  

質問

シナトラリ:

require "rubygems"
require "sinatra"

get '/' do 
    "Hello world. It's #{Time.now} at the server!"
end

windows XPオープンソースプロジェクトのmongrel,シナトラ、ショットガン.ruby-1.8.6

走るショットガンtest_app.rb結果


C:\Files\sites\sinatra>shotgun test.rb
== Shotgun starting Rack::Handler::Mongrel on localhost:9393
Thu Dec 03 16:51:37 -0800 2009: Read error: #<NotImplementedError: fork() functi
on is unimplemented on this machine>
c:/ruby/lib/ruby/gems/1.8/gems/shotgun-0.4/lib/shotgun.rb:26:in `fork'
c:/ruby/lib/ruby/gems/1.8/gems/shotgun-0.4/lib/shotgun.rb:26:in `call!'
c:/ruby/lib/ruby/gems/1.8/gems/shotgun-0.4/lib/shotgun.rb:15:in `call'
c:/ruby/lib/ruby/gems/1.8/gems/rack-1.0.0/lib/rack/content_length.rb:13:in `call'
c:/ruby/lib/ruby/gems/1.8/gems/rack-1.0.0/lib/rack/chunked.rb:15:in `call'
c:/ruby/lib/ruby/gems/1.8/gems/rack-1.0.0/lib/rack/handler/mongrel.rb:61:in `process'
c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/mongrel.rb:159:in `process_client'
c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/mongrel.rb:158:in `each'
c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/mongrel.rb:158:in `process_client'
c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/mongrel.rb:285:in `run'
c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/mongrel.rb:285:in `initialize'
c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/mongrel.rb:285:in `new'
c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/mongrel.rb:285:in `run'
c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/mongrel.rb:268:in `initialize'
c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/mongrel.rb:268:in `new'
c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/mongrel.rb:268:in `run'
c:/ruby/lib/ruby/gems/1.8/gems/rack-1.0.0/lib/rack/handler/mongrel.rb:34:in `run'
c:/ruby/lib/ruby/gems/1.8/gems/shotgun-0.4/bin/shotgun:129
c:/Ruby/bin/shotgun:19:in `load'
c:/Ruby/bin/shotgun:19

あらゆるアイデアをどう解決す。感謝です。

役に立ちましたか?

解決

私ができる最善のは、この 。散弾銃は、* nixのシステムでのみ利用可能であるフォークが必要です。あなたがパッチを提出するように感じる場合は、ネイティブにそれを行う方法についても、ビットがあります。

他のヒント

行くための簡単な方法は、のシナトラ/リロード機能のを使用することです。 シナトラ/ contribのの宝石をインストールし、メインファイルに拡張子を追加します:

require 'sinatra/reloader'

は、Windows 8.1の下で正常に動作します。

体験してみましょう 再起動を逸品 で使用するものでしたがWindowsで使用することはありません fork().おとえば、単に交換 ショットガン再スタールビー, このよう:

restart ruby test_app.rb

こちらの 詳しい情報をほとんどすべてこの作品専用に作成する方法もあります。)

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top