Skip to content

Instantly share code, notes, and snippets.

@superhighway
Last active December 14, 2015 10:48
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save superhighway/5074953 to your computer and use it in GitHub Desktop.
Save superhighway/5074953 to your computer and use it in GitHub Desktop.
Setup Sinatra di Heroku
  1. Buat folder untuk app

    mkdir nama-appnya-terserah # buat sendiri ya namanya... hehe
    cd nama-appnya-terserah
  2. Buat file yang dibutuhkan

touch app.rb config.ru Gemfile
# app.rb
require 'sinatra'
get '/' do
  "Hore Sukses!"
end
# config.ru
require './app'
run Sinatra::Application
# Gemfile
source 'http://rubygems.org'
gem 'sinatra'
  1. Buat aplikasi Heroku. Instal Heroku Toolbelt jika belum pernah.

    git init
    heroku create nama-appnya-terserah # buat sendiri ya namanya... hehe
    git add .
    git commit -am "Commit pertama"
    git push heroku master
  2. Coba tes di browser ke http://nama-appnya-terserah.herokuapp.com
    Kalo outputnya "Hore Sukses!", berarti ok.

@muslih
Copy link

muslih commented Mar 21, 2013

om...saya sudah ngikut cara di atas, kok gagal mulu ya

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment