Skip to content

Instantly share code, notes, and snippets.

@dennisreimann
Created February 9, 2009 08:18
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 dennisreimann/60714 to your computer and use it in GitHub Desktop.
Save dennisreimann/60714 to your computer and use it in GitHub Desktop.
# Rails template for initializing new projects
# Initialize git repository
git :init
# Delete unnecessary files
run "rm README"
run "rm public/index.html"
run "rm public/favicon.ico"
run "rm public/robots.txt"
run "rm public/images/rails.png"
# Copy database.yml for distribution use
run "cp config/database.yml config/database.yml.example"
# Add some common gems
gem 'mislav-will_paginate', :lib => 'will_paginate', :source => 'http://gems.github.com'
gem 'RedCloth', :lib => 'redcloth', :version => '~> 3.0.4'
gem 'mocha'
# Set up the repository
run "touch tmp/.gitignore log/.gitignore vendor/.gitignore"
file '.gitignore', <<-END
.DS_Store
log/*.log
tmp/**/*
config/application.yml
config/database.yml
db/schema.rb
db/*.sql
db/*.sqlite3
END
git :add => "."
git :commit => "-a -m 'Initial commit'"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment