Forum: Ruby on Rails Rails Continuous Deployment

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.
C6a357a406d521e1d3083468b8005c0e?d=identicon&s=25 paul.stovell@readify.net (Guest)
on 2007-06-10 16:45
(Received via mailing list)
Hi all,

I've successfully built a personal project using Rails (I come from
the .NET world), and I'm now looking into deployment. Here's what I
want to do:

- Store my application in source control (Subversion)
- Whenever I checkin, kick off a continuous build and deployment
process (on the build machine) that will:
  - Deploy the MySQL database to the web server (myapp_testing)
  - Copy the ruby application files to a virtual directory
(test.myapp.com) so that I can view it online

In the .NET world I would have done this using CruiseControl.NET and
NAnt, running OSQL.exe to deploy the database from a .SQL script file.
Is the process similar for a Rails application, or is there a much
more "rails-y" way to do it?

I notice that the database.yml files point to dev, test and production
databases. But where do you tell the application whether to use
production/test or not?

Also, how do you handle changes between schema versions and deploying
them?

Any ideas would be appreciated - I can always do it the .NET way but
I'd prefer to use a more standard way if I can.

Paul
Df4978da52459529e539da4c995918cb?d=identicon&s=25 Zach Inglis // LT3media (Guest)
on 2007-06-10 17:11
(Received via mailing list)
You could check out CruiseControl.rb ( http://
cruisecontrolrb.thoughtworks.com/ ). You could also look into
Capistrano ( www.capify.org )

There is a method to change which environment.

Cheers,
Zach Inglis

→ Blog -- http://www.zachinglis.com
→ Company -- http://www.lt3media.com
→ Portfolio -- http://portfolio.zachinglis.com
588ab1c0a5610a7e160a3b101abb91e6?d=identicon&s=25 MichaelLatta (Guest)
on 2007-06-10 18:00
(Received via mailing list)
Rails uses a system called migrations for database schema management.
Each migration (just a ruby file) has a script that can update the
schema from the prior to the next version or the reverse.  You can
then use the db:migrate rake task to migrate a database from one
version to another or to the latest version.  These files are stored
in CM just like other source files.  There are several continuos
integration frameworks that do the auto-build after a check-in.  There
may also be a CruiseControl version for Rails.  SVN seems to be the
predominant CM tool used with Rails, and MySQL is well supported as
well.

Michael


On Jun 10, 7:44 am, "paul.stov...@readify.net" <stov...@gmail.com>
8fbdd208cbecb812550683dfe9b0a1f2?d=identicon&s=25 christophermatthieu@gmail.com (Guest)
on 2007-06-11 19:33
(Received via mailing list)
Check out Rubyology's podcast #5 (http://rubyology.com/podcasts/show/
11) for Rails deployment strategies and tips on Subversion,
Capistrano, and Secure Shell

Regards,
Chris Matthieu
http://www.rubyology.com
C6a357a406d521e1d3083468b8005c0e?d=identicon&s=25 Paul Stovell (Guest)
on 2007-06-12 14:34
(Received via mailing list)
Thanks guys,

I ended up going with CruiseControl.NET (since I am already using it for
other projects - it's nice to see them all from the one panel) but using
custom rake tasks to do the deployment and configuration.

The issue I'm having now is with deployment. I tried a heap of methods
on
Apache as well as IIS (all on Windows 2003) but couldn't get any of them
working. What kind of server is every body using? The nightmare of
deploying
a rails app has really gotten me down :(

Cheers,

Paul

On 6/12/07, christophermatthieu@gmail.com
<christophermatthieu@gmail.com>
wrote:
>
> >
>


--
Paul Stovell
http://www.paulstovell.net
Cb98c59a6ff22c72676e756bbd28f266?d=identicon&s=25 Jacob Atzen (Guest)
on 2007-06-12 16:40
(Received via mailing list)
Paul Stovell wrote:
> Thanks guys,
>
> I ended up going with CruiseControl.NET (since I am already using it for
> other projects - it's nice to see them all from the one panel) but using
> custom rake tasks to do the deployment and configuration.
>
> The issue I'm having now is with deployment. I tried a heap of methods
> on Apache as well as IIS (all on Windows 2003) but couldn't get any of
> them working. What kind of server is every body using? The nightmare of
> deploying a rails app has really gotten me down :(

Apache + Mongrel. Helper tools: Mongrel Cluster and Capistrano. I used
Coda Hales walkthrough to get started, it's a pretty good end to end
description:

http://blog.codahale.com/2006/06/19/time-for-a-gro...

Notice, there's a rails-deployment group where all the experts are
hanging out ;-)

--
Cheers,
- Jacob Atzen
C6a357a406d521e1d3083468b8005c0e?d=identicon&s=25 Paul Stovell (Guest)
on 2007-06-13 01:05
(Received via mailing list)
Thanks Jacob, I'll follow those instructions and stop spamming this list
:)

On 6/13/07, Jacob Atzen <jacob@jacobatzen.dk> wrote:
> > on Apache as well as IIS (all on Windows 2003) but couldn't get any of
> Notice, there's a rails-deployment group where all the experts are
> hanging out ;-)
>
> --
> Cheers,
> - Jacob Atzen
>
> >
>


--
Paul Stovell
http://www.paulstovell.net
This topic is locked and can not be replied to.