Compile all .rb files of a Ruby on Rails app to .c

2019-08-09 01:05发布

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?

2条回答
时光不老,我们不散
2楼-- · 2019-08-09 02:04

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']
查看更多
Juvenile、少年°
3楼-- · 2019-08-09 02:07

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.

查看更多
登录 后发表回答