Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- app_name=$1
- cd ~/projects
- gem update rails
- rbenv rehash
- rails new $app_name --skip-bundle
- cd $app_name
- git init
- git add .
- git commit -m 'Genesis'
- heroku apps:create --stack cedar $app_name
- # TODO detect if heroku can't create the app (eg. name already taken)
- sed -i .bak 's/sqlite3/pg/' Gemfile
- rm Gemfile.bak
- echo "gem 'heroku'" >> Gemfile
- bundle
- rbenv rehash
- sed "s/XXX/$app_name/g" ~/path/to/database-template.yml > config/database.yml
- bundle exec rake db:migrate
- git add .
- git commit -m 'Setups postgres'
- git push heroku master
- heroku run rake db:migrate
Add Comment
Please, Sign In to add comment