Shotgun for jruby on windows, anyone?

Playing now with Sinatra and shotgun… I guess I just figured out the
hard way shotgun does not work out of the box. I even tried to use
“jruby -J-Djruby.fork.enabled=true -S shotgun” and the latest
jruby-1.6.0RC2.

shotgun sin.rb
warning: -J-Djruby.fork.enabled=true argument ignored (launched in same
VM?)
== Shotgun/WEBrick on http://127.0.0.1:9393/
[2011-02-15 23:17:33] INFO WEBrick 1.3.1
[2011-02-15 23:17:33] INFO ruby 1.8.7 (2011-02-09) [java]
[2011-02-15 23:17:33] INFO WEBrick::HTTPServer#start: pid=7208
port=9393
[2011-02-15 23:17:37] ERROR NotImplementedError: fork is not available
on this platform
org/jruby/RubyKernel.java:1745:in fork' c:/jruby/gem/gems/shotgun-0.8/lib/shotgun/loader.rb:27:incall!’
c:/jruby/gem/gems/shotgun-0.8/lib/shotgun/loader.rb:18:in call' c:/jruby/gem/gems/shotgun-0.8/lib/shotgun/favicon.rb:12:incall’
c:/jruby/gem/gems/rack-1.2.1/lib/rack/builder.rb:77:in call' c:/jruby/gem/gems/rack-1.2.1/lib/rack/content_length.rb:13:incall’
c:/jruby/gem/gems/rack-1.2.1/lib/rack/handler/webrick.rb:52:in
service' file:/C:/jruby/lib/jruby-stdlib-1.6.0.RC2.jar!/META-INF/jruby.home/lib/ruby/1.8/webrick/httpserver.rb:104:inservice’
file:/C:/jruby/lib/jruby-stdlib-1.6.0.RC2.jar!/META-INF/jruby.home/lib/ruby/1.8/webrick/httpserver.rb:65:in
run' file:/C:/jruby/lib/jruby-stdlib-1.6.0.RC2.jar!/META-INF/jruby.home/lib/ruby/1.8/webrick/server.rb:173:instart_thread’
org/jruby/RubyProc.java:268:in call' org/jruby/RubyProc.java:232:incall

Is it possible to run shotgun on jruby/windows ? if so, how (please…)
?
If it’s not possible, what are the possible alternatives ?

Thanks in advance.

Please note I’m using/experimenting a ‘special’ environment now: I
actually pack most of my useful gems and jdbc in jar files, and I’m
using jruby-core-1.6.0.RC2.jar, jruby-stdlib-1.6.0.RC2.jar and a few
batch/cmd files. I know this is not a standard way, but I found out
this to be quite efficient on windows. I may document this some time
and share it with the list :slight_smile:


Christian

spork might work on windows…

You might also have a look at Kirk
(https://github.com/strobecorp/kirk) which will have similar
functionality to shotgun but using JRuby+Jetty. Development is still
early and I don’t think there has been a release yet but you might be
able to use it.

/Nick

On Tue, Feb 15, 2011 at 4:21 PM, Christian MICHON

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs