Herokuの新しいCedar Stackを使う。 今までと大きく違うのはforemanを使ったprocess modelが導入されたこと。要はwebアプリもcronジョブもバックグラウンドタスクもみんな宇宙船UNIX号の仲間たち、foremanで平等に扱おうよということ。具体的にはProcfileにprocessの設定を書いてforeman経由で動かす。 # Gemfile: source :rubygems gem 'rack' # config.ru: require 'rubygems' require 'rack' class App def call(env) [200, {'Content-Type' => 'text/plain'}, ['hello']] end end run App.new # Procfile: web: bundle exec rackup -p