Can a Rails plugin be packaged as a WAR/JAR file?

允我心安 提交于 2019-12-11 06:47:16

问题


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

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