hasen's tech life

Twitter: @hasen

Heroku Toolbeltを使用してHerokuにデプロイする.

# Heroku Toolbeltを使用してHerokuにデプロイする.
# 参考(ほとんど同じです).
【mkdirからデプロイまで3分】Sinatra+Haml+Sass+Coffee でサクッとHerokuに公開して捨てるwebアプリ
# Heroku Toolbeltを使用することが主な変更点.
参考: Heroku Toolbelt

# directory
$ mkdir APPNAME && cd !$

# git
$ git init

# bundle
$ bundle init
$ vi Gemfile

$ bundle install --path vendor/bundle

# source
$ mkdir views
$ touch app.rb Procfile views/index.haml vendor/.gitkeep
# .gitignore,vendor/.gitkeep以外は参考ページと同じです.


# test
$ bundle exec foreman start
# ブラウザでloalhost:5000を確認

# git
$ git add . && git commit -m "COMMIT MESSAGE"

# heroku
$ heroku create APPNAME
$ git push heroku master
$ heroku open
# https://APPNAME.herokuapp.com/が表示される.