问题
Can a plugin be packaged as a JAR/WAR file similar to the way in which an entire Rails app can be packaged for deployment on JRuby?
回答1:
either you want warbler or you want to make a jar.
If you need an empty rails app with that plugin, create an empty project, install the plugin and, edit config/warble.rb to copy the gems you need
If you need a jar with class files from that plugin; you need jrubyc to compile the rb files to class files that you can then turn into a jar with the java jar command. Put that jar into WEB-INF/lib of any Java app that needs those ruby classes.
来源:https://stackoverflow.com/questions/1114616/can-a-rails-plugin-be-packaged-as-a-war-jar-file