Skip to content

Instantly share code, notes, and snippets.

@maccman
Created January 5, 2009 16:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save maccman/43450 to your computer and use it in GitHub Desktop.
Save maccman/43450 to your computer and use it in GitHub Desktop.
# The first few steps I always make when creating a new Rails app
# Alex MacCaw
# info@eribium.org
# cd home
cd
# Setup your svn repo
svn mkdir your_svn_details/app_name
svn mkdir your_svn_details/app_name/trunk
# Grab a local copy of Rails edge (if you haven't got one already)
git clone git://github.com/rails/rails.git
# Generate Rails edge app
ruby ~/rails/railties/bin/rails app_name
# Create repo
svn co your_svn_details/app_name/trunk app_name
cd app_name
# Or clone Rails manually (which takes longer)
cp -r ~/rails vendor/rails
# We usually use Cap
capify .
# We need to move this as it's going to be ignored
mv config/database.yml config/database.example.yml
rm -rf tmp
rm -rf public/index.html
# Add all files
# alias svnaddall='svn status | grep "^\?" | awk "{print \$2}" | xargs svn add'
svnaddall
svn commit -m 'first commit'
svn propedit svn:ignore .
tmp
svn propedit svn:ignore log
*.log
svn propedit svn:ignore db
*.sqlite3
svn propedit svn:ignore config
database.yml
svn commit -m 'add ignore'
cp config/database.example.yml config/database.yml
#
# mate routes.rb
# map.root :controller => 'foo'
#
# mate application.rb
# filter_parameter_logging :password, :password_confirmation
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment