How to use rake from tomcat environment?

View: New views
7 Messages — Rating Filter:   Alert me  

How to use rake from tomcat environment?

by Peter Ritchie :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I'd like to have the same model so if there are also batch procedures,
how do you manage it?
--
Posted via http://www.ruby-forum.com/.

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

    http://xircles.codehaus.org/manage_email



Re: How to use rake from tomcat environment?

by Charles Oliver Nutter-4 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Fri, Oct 9, 2009 at 4:17 AM, Marco Mastrodonato <lists@...> wrote:
> I'd like to have the same model so if there are also batch procedures,
> how do you manage it?

Is this basically a question about how you can run migrations from
within an app server (like on deploy)?

- Charlie

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

    http://xircles.codehaus.org/manage_email



Re: How to use rake from tomcat environment?

by Chad Woolley :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Fri, Oct 9, 2009 at 1:58 PM, Charles Oliver Nutter
<headius@...> wrote:
> On Fri, Oct 9, 2009 at 4:17 AM, Marco Mastrodonato <lists@...> wrote:
>> I'd like to have the same model so if there are also batch procedures,
>> how do you manage it?
>
> Is this basically a question about how you can run migrations from
> within an app server (like on deploy)?

We have the same question on migrations- specifically for an app which
will be installable by users on their own environment.  Our ideas are:

1. For each release with migrations, distribute a separate executable
jar file which contains the migrations to be run

2. Add an admin interface that allows migrations to be run.  This
would probably have to be something (rack?) that detects if migrations
are out-of-date, and redirects to an admin interface which allows
migrations to be run (a separate 'embedded' rails app?)

Any ideas/experience along these lines would be great...

-- Chad

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

    http://xircles.codehaus.org/manage_email



Re: How to use rake from tomcat environment?

by Peter Ritchie :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Charles Nutter wrote:

> On Fri, Oct 9, 2009 at 4:17 AM, Marco Mastrodonato
> <lists@...> wrote:
>> I'd like to have the same model so if there are also batch procedures,
>> how do you manage it?
>
> Is this basically a question about how you can run migrations from
> within an app server (like on deploy)?
>
> - Charlie
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
>     http://xircles.codehaus.org/manage_email

Yes, migrations are an example but generally i would like to know how to
exec a rake task in production environment. I have always used mongrel
for the production and i am testing java way but at the moment i'm using
an ugly solution: i've the application .war that runs under tomcat and,
in another path, the rails structure that let me to exec rake task
...but i wouldn't duplicate an application so how do you manage your
production environment?
--
Posted via http://www.ruby-forum.com/.

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

    http://xircles.codehaus.org/manage_email



Re: Re: How to use rake from tomcat environment?

by straightflush@gmail.com :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

# cd tomcat5/webapps/YOURAPP/WEB-INF
# export GEM_HOME=tomcat5/webapps/YOURAPP/WEB-INF/gems
# cp Rakefile .
# mkdir -p db/migrate
# cp  SOURCE/db/migrate/* db/migrate
# run "java -jar lib/jars/jruby-complete-1.3.1.jar -S rake db:migrate"

-AD

On Mon, Oct 26, 2009 at 7:13 AM, Marco Mastrodonato
<lists@...> wrote:

> Charles Nutter wrote:
>> On Fri, Oct 9, 2009 at 4:17 AM, Marco Mastrodonato
>> <lists@...> wrote:
>>> I'd like to have the same model so if there are also batch procedures,
>>> how do you manage it?
>>
>> Is this basically a question about how you can run migrations from
>> within an app server (like on deploy)?
>>
>> - Charlie
>>
>> ---------------------------------------------------------------------
>> To unsubscribe from this list, please visit:
>>
>>     http://xircles.codehaus.org/manage_email
>
> Yes, migrations are an example but generally i would like to know how to
> exec a rake task in production environment. I have always used mongrel
> for the production and i am testing java way but at the moment i'm using
> an ugly solution: i've the application .war that runs under tomcat and,
> in another path, the rails structure that let me to exec rake task
> ...but i wouldn't duplicate an application so how do you manage your
> production environment?
> --
> Posted via http://www.ruby-forum.com/.
>
> ---------------------------------------------------------------------
> 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



Re: Re: How to use rake from tomcat environment?

by Peter Ritchie :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

straightflush@... wrote:
> # cd tomcat5/webapps/YOURAPP/WEB-INF
> # export GEM_HOME=tomcat5/webapps/YOURAPP/WEB-INF/gems
> # cp Rakefile .
> # mkdir -p db/migrate
> # cp  SOURCE/db/migrate/* db/migrate
> # run "java -jar lib/jars/jruby-complete-1.3.1.jar -S rake db:migrate"
>
> -AD
>

Thanks for this solution
--
Posted via http://www.ruby-forum.com/.

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

    http://xircles.codehaus.org/manage_email



Re: Re: How to use rake from tomcat environment?

by Chad Woolley :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Mon, Oct 26, 2009 at 5:46 AM, straightflush@...
<straightflush@...> wrote:
> # cd tomcat5/webapps/YOURAPP/WEB-INF
> # export GEM_HOME=tomcat5/webapps/YOURAPP/WEB-INF/gems
> # cp Rakefile .
> # mkdir -p db/migrate
> # cp  SOURCE/db/migrate/* db/migrate
> # run "java -jar lib/jars/jruby-complete-1.3.1.jar -S rake db:migrate"

...and ideally all of that could be encapsulated with a command-line
option to an executable WAR file.  Look at how Hudson CI server
manages executable WAR files for ideas.  We are planning to do this
with embedded Glassfish, anyone have existing code to share?

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

    http://xircles.codehaus.org/manage_email