开发者

How do I get RubyGems to work with Jruby and JBOSS; works with Tomcat but not JBoss

I have a WAR file that uses jruby-complete.1.5.2.jar to provide JRuby as a ScriptEngine. My JRuby script relies on some Ruby gems that I packaged in a jar file. This works fine when I run the WAR file under Tomcat, but it does NOT work when I use JBoss 5.1.0.

To trouble shoot, I even tried running a simple script that required the "rake" rubygem that comes packaged in thh jruby-complete-1.5.2.jar file. This does NOT work unde开发者_JAVA百科r JBoss either. It seems that no rubygems can be found when running under JBoss. There must be some setting I'm not getting correct for JBoss. Should I set the Ruby loadpath to some classpath in my WAR? Some one must have done this for JBoss. It works fine with stand alone Tomcat, so there must be something I'm not doing for JBoss and its embedded Tomcat server.

Sorry for the newbie question, but your help would be truly appreciated. To work around this, I customized the jrub-complete-1.5.2.jar file and placed the RubyGems into the JRuby loadpath of the jar file (i.e. classpath:$/META-INF/jruby.home/lib/ruby/site_ruby/1.8). That works on JBoss, but I would rather NOT do this and have the RubyGems mechanism work on both stand alone Tomcat and JBoss. Thanks for your help.


Try TorqueBox, which integrates JRuby and JBoss AS

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜