Compile all .rb files of a Ruby on Rails app to .class using JRuby, pack it into a .war and deploy into a Java appserver

最后都变了- 提交于 2019-12-11 07:43:12

问题


Is it possible to compile all .rb source files files (including the configuration source file files) of Ruby on Rails to .class files using JRuby, pack it into a .war file and deploy to JBoss or another Java appserver?


回答1:


Check out warbler for this purpose.

From the main page:

Warbler is a gem that makes a .war file out of a Rails, Merb, or Rack-based application. The intent is to provide a minimal, flexible, ruby-like way to bundle all your application files for deployment to a Java application server.




回答2:


the following command should compile all .rb to .class

warble compiled

in the warble.rb file you can uncomment the line to compile only some Ruby files

# config.compiled_ruby_files = FileList['app/**/*.rb']


来源:https://stackoverflow.com/questions/7503787/compile-all-rb-files-of-a-ruby-on-rails-app-to-class-using-jruby-pack-it-into

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!