开发者

How do I run rake rake tasks in a rails app which is served by tomcat with jruby war deployment?

开发者 https://www.devze.com 2023-01-27 01:59 出处:网络
I have a rails application deployed to tomcat, the code has been compiled to java classes and packed开发者_如何学编程 to a war file. And I\'m wondering, is there a way for me to run rake tasks as I al

I have a rails application deployed to tomcat, the code has been compiled to java classes and packed开发者_如何学编程 to a war file. And I'm wondering, is there a way for me to run rake tasks as I always did ?


I'd like a convenient way of doing this too, although I'm not sure it's possible.

From the exploded (unzipped) WAR, you can get somewhere with this kind of thing:

  java -cp WEB-INF/lib/jruby-core-1.6.4.jar -S rake


java -jar WEB-INF/lib/jruby-core-1.6.4.jar -S rake

This worked for me. Possibly the same as the previous answer, but I do not know enough about java, .war files, or jruby, to say in any certainty.

0

精彩评论

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