Deploying the sample application

First you will create a new Heroku application. Before executing the following command, check that you are inside the ruby-getting-started directory:

$ heroku create
Creating mighty-atoll-7219... done, stack is cedar-14
https://mighty-atoll-7219.herokuapp.com/ | https://git.heroku.com/mighty-atoll-7219.git
Git remote heroku added

A new application was created with the name mighty-atoll-7219 and provided at https://mighty-atoll-7219.herokuapp.com. This URL will start working only after the first deploy. A Git repository was also created. This repository is available at https://git.heroku.com/mighty-atoll-7219.git and you can also add it using the git [some action] heroku command.

Finally, for starting the deploy, just type the command:

$ git push heroku master
Counting objects: 168, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (110/110), done.
Writing objects: 100% (168/168), 30.31 KiB | 0 bytes/s, done.
Total 168 (delta 46), reused 164 (delta 43)
Compressing source files... done.
Building source:

-----> Ruby app detected
-----> Compiling Ruby/Rails
-----> Using Ruby version: ruby-2.0.0
-----> Installing dependencies using 1.7.12
 Running: bundle install --without development:test --path vendor/bundle --binstubs vendor/bundle/bin -j4 --deployment
 Fetching gem metadata from https://rubygems.org/...........
 Installing rake 10.4.0
 Installing i18n 0.6.11
 ...
-----> Preparing app for Rails asset pipeline
 Running: rake assets:precompile
 ...

-----> Discovering process types
 Procfile declares types -> web
 Default types for Ruby -> console, rake, worker

-----> Compressing... done, 27.0MB
-----> Launching... done, v6
 https://mighty-atoll-7219.herokuapp.com/ deployed to Heroku

Verifying deploy... done.
To https://git.heroku.com/mighty-atoll-7219.git
...

Tip

You don't need to worry about costs at this moment. When you create a new application, just one dyno is used and it's free.