Skip to content

Heroku

Jóni Batista edited this page · 11 revisions

Table of Contents

  1. Resources
  2. Add new application
  3. Deploying with Git
  4. Heroku console

Resources

Add new application

$ cd ~/project_folder

# Creating a new application at Herok
$ heroku create

# Creating a new application at Herok called myapp
$ heroku apps:create myapp

# Or add to an existing heroku app
$ heroku git:remote -a app-name

Deploying with Git

# push app to heroku
$ git push heroku master

# run migrations
$ heroku run rake db:migrate --app app-name

# precompile assets
$ heroku run rake assets:precompile --app app-name

Heroku console

# open rails console
$ heroku run rails c --app app-name

# view heroku logs
$ heroku logs --app app-name

# precompile assets
$ heroku run rake assets:precompile --app app-name
Something went wrong with that request. Please try again.