RockPaperScissors

LizardSpock

Sinatra Running on Heroku

| Comments

For running small webapps heroku is free. The real attraction is the simplicity of deployment, if you are use to git you just push to heroku.

Current instructions are missing the step of creating the .gems file. So here is my quick walk through. Register on heroku first.

mkdir new_web_app
cd new_web_app
gem install heroku
touch config.ru
touch app.rb
touch .gems

config.ru

require 'app'
run Sinatra::Application

app.rb

require 'rubygems'
require 'sinatra'

get '/' do
   "Hello from Sinatra on Heroku!"
end

.gems

sinatra --version '>=1.0'

Now run these commands to finish off and deploy

git init
git add config.ru app.rb .gems 
git commit -a -m 'Initial commit'
heroku create
git push heroku master
heroku open

Comments