What is the "right" way to upload my Rails application?

Hi all,

I’ve been developing with Rails for about two weeks now. Just met a
deadline where we already have users, comments, and some other cool app
logic up on the site. This framework is a dream next to Struts.

The issue is, I’ve been doing things quick and dirty, but because if I
expect the site to become successful I want everything in its proper
place and done the right way so that bug fixes and enhancements become
quick and easy.

Let me tell you what I’m using/doing right now to make this work:

  1. Using Aptana IDE on my local windows machine for all bug
    fixes/enhancements
  2. Once I’m done, I copy the folder to an “Archive” folder so that I can
    recover previous code versions.
  3. Uploading the “app” “db” “routes.rb” and “public” folders via FTP to
    my server
  4. Logging into my server using Putty to run any db:migrate’s
  5. Logging into my CPanel and restarting the server.

I know this method has to seem ridiculous to some of you. I want to
make it better. This is what I THINK I need in order to get organized
in a professional way:

  1. A Subversion repository that either works with Aptana or something
    like TortoiseSVN.
  2. A Build-and-Deploy application to push my code out to the server from
    subversion with the push of a single button.
  3. Some sort of program to restart my server.

I’m just getting started here. I’m also missing an error page that
emails me when the site is down or it catches an exception.

Any suggestion?

Thanks!

Yes, you definitely want to be using version control and deployment
scripts.
Here are my suggestions for you:

  1. Use git instead of subversion, and use http://github.com/ for hosting
    it.
  2. Use capistrano for deployment
  3. Capistrano has tasks for restarting the server, running migrations,
    etc.


Benjamin C.
http://railskits.com/ - Ready-made Rails code
http://catchthebest.com/ - Team-powered recruiting
http://www.bencurtis.com/ - Personal blog

On Sat, Dec 13, 2008 at 12:42 PM, David D. <