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:in
call!’
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:in
call’
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:in
call’
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:in
service’
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:in
start_thread’
org/jruby/RubyProc.java:268:in call' org/jruby/RubyProc.java:232:in
call
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
–
Christian