Register now and start sharing your code snippets.
-->

Jump start a Rails project with Rails Edge, Capistrano, Mongrel and Mercurial

Shell Script (Bash) posted about 1 year ago by christian

   1  # Create a Rails project
   2  rails project -d sqlite3
   3  cd project
   4  # Delete index file
   5  rm public/index.html
   6  # Use Rails edge. Use  rake rails:freeze:edge TAG=rel_1-2-3 to get a specific version.
   7  rake rails:freeze:edge
   8  # Add Capistrano configuration file
   9  capify .
  10  # Add Mongrel cluster configuration file
  11  sudo mongrel_rails cluster::configure -e production \
  12      --user mongrel --group mongrel \
  13      -c /var/www/project-xxx/current \
  14      -a 127.0.0.1 \
  15      -p 8000  \
  16      -N 3
  17  # Create a Mercurial repository
  18  hg init
  19  # Add project to repository
  20  hg commit -A --message "Project started"
  21  # Push changes to a remote repository
  22  hg push ssh://user@ip:port//var/mercurial/xxx

Cloning is done with hg clone:

   1  hg clone ssh://user@ip:port//var/mercurial/xxx

Tagged rails, capistrano, mongrel, mercurial