LoginSignup
10
9

More than 5 years have passed since last update.

HerokuにpushしたRailsプロジェクトのassetsが読み込まれない問題の解決方法

Last updated at Posted at 2014-12-11

HerokuにpushしたRailsプロジェクトをheroku openしてブラウザから確認すると、assetsの全て、CssやJavaScriptなどが読み込まれていませんでした(;´༎ຶω༎ຶ`)

config.assets.compileを設定

production.rbにconfig.assets.compileの設定があるようなので、そちらを編集します。

production.rbを編集
vi config/environments/production.rb

config.assets.compile = true

config.assets.compileをtrueに変更しました。
変更分をHerokuへ反映すると、ちゃんとassetsが読み込まれるようになりました(☝ ՞ਊ ՞)

参考

Rails 4: How To Fix The Heroku Assets Not Found CSS Image Issue
http://natashatherobot.com/rails-4-heroku-assets-not-found-css-image/

10
9
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
10
9