How to perform rake tasks in a rails application that is served by tomcat using jruby war?

I have a rails application deployed to tomcat, the code was compiled into java classes and packaged into a war file. And I wonder if I have a way to run rake tasks, as I always did?

+1
source share
2 answers

I would also like a convenient way to do this, although I'm not sure if this is possible.

From a hacked (unpacked) WAR, you can find things like this somewhere:

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

It worked for me. Perhaps the same as the previous answer, but I don’t know enough about java, .war files or jruby to say with any confidence.

0
source

Source: https://habr.com/ru/post/1338163/


All Articles