ruby - Can't run sinatra as a .class file -
i'm trying run sinatra "hello world" compiled class file jruby.
it working when i'm running interpretet, .class file following error:
exception in thread "main" org.jruby.exceptions.raiseexception: (loaderror) no such file load -- rubygems @ org.jruby.rubykernel.require(org/jruby/rubykernel.java:966) @ ruby.<top>(index.rb:1)
here source code:
require 'sinatra' '/hello/:name' "hello #{params['name']}" end
here how compiled , executed it:
jruby -s jrubyc index.rb java -cp .;c:\dev\lang\ruby\jruby-9.0.0.0.pre2\lib\jruby.jar index
any ideas i'm doing wrong?
make sure have "complete" jruby-complete.jar ... might not use file-system jruby layout files when started using java
. want @ warbler make sure needed gets packed (e.g. sinatra has gem rack dependency etc.)
alternatively can try using jruby index
or jruby index.class
Comments
Post a Comment