如何在由带有 jruby 战争部署的 tomcat 服务的 rails 应用程序中运行 rake rake 任务? [英] How do I run rake rake tasks in a rails app which is served by tomcat with jruby war deployment?

查看:61
本文介绍了如何在由带有 jruby 战争部署的 tomcat 服务的 rails 应用程序中运行 rake rake 任务?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个部署到tomcat的rails应用程序,代码已经编译成java类并打包成war文件.我想知道,有没有办法让我像往常一样运行 rake 任务?

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 ?

推荐答案

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

这对我有用.可能与之前的答案相同,但我对 java、.war 文件或 jruby 的了解不够,无法确定.

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.

这篇关于如何在由带有 jruby 战争部署的 tomcat 服务的 rails 应用程序中运行 rake rake 任务?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆