LoginSignup
11
10

More than 5 years have passed since last update.

Railsで本番環境でCSSが読み込まれなかったとき簡易メモ

Last updated at Posted at 2014-04-06

be rake assets:precompile RAILS_ENV=production

be rails s -e production

したらCSSが読まれなかった

be rake tmp:pids:clear

be rake tmp:sessions:clear

be rake tmp:sockets:clear

be rake tmp:cache:clear

したらCSS反映された

例外

config/environments/production.rb
config.assets.precompile += %w( 任意のjs )

に設定してassets_pipelineで扱うcss/jsから分離したいjsファイルがあったんですが、ちょっと今ハマってます。be rails s -e production時にCSSもJSも読み込まれない。

エラーは

ActionController::RoutingError (No route matches [GET] "/assets/application-7dff9baa60e76434a2f68850d117df69.css"):

ActionController::RoutingError (No route matches [GET] "/assets/non_precompile/new_student_lectures_checkbox-3302b9a153efe192e717277e9ff36e6d.js"):

くそう

11
10
1

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
11
10