2016-12-08 4 views
1

Je suis en train de générer un fichier de guerre en utilisant la paruline pour JRuby, mais je suis coincé et je reçois cette erreur:génèrera un fichier de guerre en utilisant la paruline

warble aborted! 
NoMethodError: undefined method `booter=' for nil:NilClass 
config/warble.rb:9:in `block in initialize' /Users/xxx/.rvm/gems/jruby-9.0.5.0/gems/warbler-2.0.4/lib/warbler/config.rb:216:in `initialize' 
config/warble.rb:4:in `<eval>' 
/Users/xxx/.rvm/gems/jruby-9.0.5.0/gems/warbler-2.0.4/lib/warbler/task.rb:46:in `initialize' 
/Users/xxx/.rvm/gems/jruby-9.0.5.0/gems/warbler-2.0.4/lib/warbler/application.rb:27:in `load_rakefile' 
/Users/xxx/.rvm/gems/jruby-9.0.5.0/gems/warbler-2.0.4/lib/warbler/application.rb:79:in `run' 
/Users/xxx/.rvm/gems/jruby-9.0.5.0/gems/warbler-2.0.4/lib/warbler/application.rb:74:in `run' 
/Users/xxx/.rvm/gems/jruby-9.0.5.0/gems/warbler-2.0.4/bin/warble:11:in `<top>' 
/Users/xxx/.rvm/gems/jruby-9.0.5.0/bin/warble:23:in `<top>' 
(See full trace by running task with --trace) 

mon fichier de configuration dans config/warble.rb:

Warbler::Config.new do |config| 
    config.dirs = %w(app config views) 
    config.gems += ["sinatra"] 
    config.gems -= ["rails"] 
    config.jar_name = "jsinatra" 
    config.webxml.booter = :rack 
    config.webxml.jruby.compat.version = "1.9" 
    config.webxml.rackup.path = '/WEB-INF/config.ru' 
end 

toute aide, avis apricciated. Je vous remercie.

Dans l'ensemble, j'essaie de créer un conteneur docker et j'utilise le fichier pdf comme référence, mais le pdf est en quelque sorte vaguement écrit. http://www.ibm.com/developerworks/cloud/library/cl-sinatra-softlayer-app/cl-sinatra-softlayer-app-pdf.pdf

+0

essayer dernière JRuby 9K (9.1.6.0 avec Warbler 2.0.4) ... pas sûr comment bien 9.0.5 fonctionne toujours avec Warbler. – kares

+0

merci, je vais essayer ça. –

Répondre

0

a marché pour moi

Dans le pdf que j'ai posté il y a fichier nommé rackup.ru avec ce contenu:

require "sinatra" 
require File.dirname(__FILE__) + '/app/main' 
run MyApp 

Après des heures de googler, j'ai décidé de créer un fichier identique et nommez-le config.ru. Travaillé.

ne fonctionne pas

J'ai aussi essayé de changer

config.webxml.rackup.path = '/WEB-INF/config.ru' 

à

config.webxml.rackup.path = '/WEB-INF/rackup.ru' 

ne fonctionne pas.