Skip to content

Instantly share code, notes, and snippets.

@anaerobeth
Forked from radavis/.rails_aliases
Created September 12, 2013 16:00
Show Gist options
  • Save anaerobeth/6539934 to your computer and use it in GitHub Desktop.
Save anaerobeth/6539934 to your computer and use it in GitHub Desktop.
function rails_pg() {
rails new $1 -T --database=postgresql &&
cd $1 &&
echo $1 > .ruby-gemset &&
echo 2.0 > .ruby-version &&
echo /config/database.yml >> .gitignore &&
cp config/database.yml config/database.example.yml &&
add_rails_gems &&
bundle &&
rails g rspec:install &&
git init &&
git add . &&
git commit -m 'Initial commit' &&
subl .;
}
function add_rails_gems() {
echo "
group :test, :development do
gem 'rspec-rails'
gem 'capybara'
gem 'factory_girl_rails'
gem 'shoulda'
gem 'valid_attribute'
gem 'launchy'
end
" >> Gemfile;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment