'rails new <new-app> --database=postgresql’
cd <new-app>
git init
git add
git commit -m “Initial commit"
Create a new repo on Github. Choose your .gitgonore, README and licensing for what you prefer. In the command line of the project:
git remote add origin [email protected]:<username>/<new_app>.git
If you initiliazed the new repo on Github with either of the files or licensing, you'll need to:
git pull
and then:
git push origin master
Before you go back to github and do a pull request, you can checkout a new 'development' branch
git co -b development
git push origin development
On Github, go to Settings -> Branches and then change master to development for the default branch
'feature', 'release', and 'hotfix' branches can be made off of the development-branch locally
You can add collaborators if you want and your repo is ready for creating an amazing Rails app!
heroku
heroku create <app-name>
heroku run rake db:migrate
git push heroku development:master
✧ Make sure gem 'pg' is under production in your Gemfile:
group :production do
gem 'pg'
end
✧ Seed your db:
heroku run rake db:seed
✧ Drop and recreate the db:
heroku pg:reset