Skip to content

Instantly share code, notes, and snippets.

@arbaouimehdi
Last active June 2, 2017 16:34
Show Gist options
  • Save arbaouimehdi/636a215c372c436454c2ec8de4fc86f6 to your computer and use it in GitHub Desktop.
Save arbaouimehdi/636a215c372c436454c2ec8de4fc86f6 to your computer and use it in GitHub Desktop.
Deploying Ruby on Rails App (Bitbucket)
# 1 (New App)
rails new myapp --database=postgresql
# 2 (Bundle Install)
bundle install
# 3 (Run Server)
rails server -b $IP -p $PORT
# 4 (Git Config)
git config --global user.name "Your Name"
git config --global user.email [email protected]
git config --global push.default matching
git config --global alias.co checkout
# 5 (Git Files)
git init
git add -A
git status
git commit -m "Initialize repository"
git log
# 6 (Printing the public key)
cat ~/.ssh/id_rsa.pub
# 7 (BitBucket)
- Sign up for a Bitbucket account
- Add new private Bitbucket Repository
- Go to setting and Access Keys
- Copy your public key to your clipboard
- Add your public key to Bitbucket
# 8 (Adding Bitbucket and pushing up the repository.)
git remote add origin [email protected]:<username>/hello_app.git
git push -u origin --all
# 9 (Heroku)
heroku login
heroku keys:add
heroku create
git push heroku master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment