Skip to content

Instantly share code, notes, and snippets.

@koshigoe
Created September 6, 2008 14:38
Show Gist options
  • Save koshigoe/9152 to your computer and use it in GitHub Desktop.
Save koshigoe/9152 to your computer and use it in GitHub Desktop.
require File.join(File.dirname(__FILE__), 'config', 'common.rb')
require 'ssb'
require 'ssb/rack'
# mod_passenger の場合の対応
unless ENV['RACK_ENV']
# mod_passenger だと、env['CONTENT_LENGTH'] が文字列で入らない様子
use Rack::Lint
# mod_passenger は static なファイルは標準でファイル読み込みになる
# * RackBaseURI を使って DocumentRoot と アプリケーションエンドポイントが異なる場合に上手く行かない
# * DocumentRoot が static なファイルのルートになる様子
use Rack::Static, :urls => ['/javascripts', '/stylesheets', '/emoji', '/images'], :root => 'public_html'
end
run SSB::Application.new
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment