社内でテスト運用しているアプリを Rails 3.0 + PostgreSQL 9.0 + Unicorn + Nginx で動かそう!という話になって、とりあえず Unicorn 単体で Rails アプリを起動するところまでこぎつけたのですが、なぜか public 以下に置かれたファイルが 404 Not Found に。 なぜ?と思ってログを参照すると、どうやら静的ファイルも通常のルーティングで処理しようとしている様子。つまり stylesheets/application.css なら stylesheets コントローラの application というアクションを css 形式で呼んでいる、と。 これを回避するには Rails 側の設定で config/environments/production.rb に config.serve_static_assets = true