Rake tasks from war file

I want to run some rake tasks from a war file (i.e. after it’s deployed
and
exploded, I want to be able to run some setup and import tasks). I see
from
this response on stack overflow that there was work going on to make
this
simpler, but I was unable to find docs on that with my searches. Is
this a
solved problem now, or do we still need to write a wrapper script to
make
life easy?

Mat

I would be happy to see such functionality as well. It would be very
useful
for situations where you basically need to provision the app onto some
machine in a self-contained way: the machine may not have any ruby/jruby
installation on it, but you still need to drop the war, and execute
db:migrate for instance. This arises in cloud situations where from
security considerations it s not desirable that the developer has access
to
the VM, but still has to have a way to run rake tasks remotely through
some
mechanism. Kuddos for starting this feature!
On Oct 17, 2012 11:58 PM, “mathew duafala” [email protected] wrote:

I want to run some rake tasks from a war file (i.e. after it’s deployed
and exploded, I want to be able to run some setup and import tasks). I
see
from this response on stack overflow that there was work going on to
make
this simpler, but I was unable to find docs on that with my searches.
Is
this a solved problem now, or do we still need to write a wrapper script
to
make life easy?

Why do you want to run it as a war? Get out of the jail!

s/that/than/

doh.

Same argument applies to standalone JARs I’d say. It’s much less hassle
to deploy a kitchen-sink app that rely on 150+ files being in the right
place
(Bundler is not a good way to deploy applications IMO).

It would definitely be worth raising this on the warbler issue
tracker. I’d like to see a standard way to do this as part of warbler.

One of my engineers found this gem

It looks like it will do what I need, except it requires a ruby to be
installed on the host, which is less than ideal. We do have ruby on the
deployment boxes, but it’s a quite old version. It seems to cover my
use
case for the moment though.

Mat

On Fri, Oct 19, 2012 at 10:11 AM, Dick D.