Forum: JRuby deployment task in jruby on rails

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
D3ab365ec2c78d27e5a68e912848e85f?d=identicon&s=25 László Bácsi (Guest)
on 2009-02-05 12:00
(Received via mailing list)
Hi,

I'm new to this list, so hello everyone. I'm László Bácsi from Hungary,
where I work for Virgo Systems as the lead ruby developer.

I have a problem that have bugged me for I while. The question is how to
deploy a rails application on the jruby platform as easily as it would
be
with capistrano on MRI. We need to deploy to Tomcat so packaging the
application in a war file and copying it to the server is no problem,
but
what about other deployment tasks like db migrations, putting up a
maintenance page, working with assets, etc.

If we used capistrano we would need a complete ruby environment on every
server with all the gems the application needs. And preferably this
should
be a jruby environment because of compatibility issues. This seems like
the
wrong approach here, because we already have the application with all of
its
dependencies bundled in a war.

I see two approaches that could work:
1. Implement all of the special deployment tasks in a designated
controller
    An action (or several actions) on this controller would be called
after
the war file is deployed. This could solve the db migration issues but
it
still wouldn't be a good solution for tasks which need to do stuff on
all
the application servers. But there might be a way to call this action on
specific servers. I think this could work and maybe all of this could be
packaged in a Rails Engine (which is a new feature in Rails 2.3)
2. Use one of the deployment solutions from the Java world
    I have no clue about this but it might be that there are great
solutions
for this kind of stuff in the Java world. I hear people talking about
maven
and the pieces I've put together from these conversations make me think
that
it could solve this issue. But that would need a lot of work.

What automating tools do you use for Rails deployment on the JRuby
platform?

Cheers,
LacKac
4a72bb2b2e6831599b6a0864dae69bb1?d=identicon&s=25 Martijn S (Guest)
on 2009-02-05 12:34
(Received via mailing list)
Hi,

I've been struggling with the same issue. As long as your application
can
start without the latest database schema, initiating a migration is as
simple as the following call:

ActiveRecord::Migrator.migrate("db/migrate/")

So I guess you could implement this in a controller. You could then
probably
fire it with a ServletContext lifecycle event if you're sure your
migrations
cannot break anything. Wether that's good practice, I doubt it.

I'm very curious too about the Java EE way of doing this. There must be
a
nice tool for this, though I'd like to keep our current ActiveRecord
migrations since we use these in our development, too.

Regards,

Martijn Storck


László Bácsi wrote:
> what about other deployment tasks like db migrations, putting up a
> I see two approaches that could work:
>     I have no clue about this but it might be that there are great
> Cheers,
> LacKac
>
>

--
View this message in context:
http://www.nabble.com/deployment-task-in-jruby-on-...
Sent from the JRuby - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email
F15fdc7cb2e911b3808837f2be244add?d=identicon&s=25 AD (Guest)
on 2009-02-06 05:02
(Received via mailing list)
what about using a Hudson Task for this ?

On Thu, Feb 5, 2009 at 6:34 AM, Martijn S <martijn@bluerail.nl> wrote:
> fire it with a ServletContext lifecycle event if you're sure your migrations
>
>> application in a war file and copying it to the server is no problem, but
>>
>> 2. Use one of the deployment solutions from the Java world
>>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
>    http://xircles.codehaus.org/manage_email
>
>
>

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email
This topic is locked and can not be replied to.