Skip to content

Instantly share code, notes, and snippets.

@ctcherry
Forked from Lytol/gist:45845
Created January 18, 2009 01:54
Show Gist options
  • Save ctcherry/48519 to your computer and use it in GitHub Desktop.
Save ctcherry/48519 to your computer and use it in GitHub Desktop.
# Rails template for a basic project assuming the following:
#
# - SQLite for DB
# - Git for version control
#
# Based on a similar template by: Brian Smith (bsmith@swig505.com)
# Basic housekeeping
#
run "rm public/index.html"
run "rm public/images/rails.png"
run "rm README"
run "ln -s /Library/Ruby/Rails vendor/rails"
# Prepare the database
#
run "cp config/database.yml config/database.yml-sample "
rake "db:create:all"
rake "db:migrate"
# Git Setup
#
File.open(".gitignore","w") do |f|
f.write <<-EOF
.DS_Store
log/*.log
tmp/*
tmp/**/*
config/database.yml
db/*.sqlite3
EOF
end
run "touch log/.gitignore"
run "touch tmp/.gitignore"
git :init
git :add => "."
git :commit => "-a -m 'Create edge rails project'"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment