0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

AWSデプロイしてアプリの背景画像を表示させる

Posted at

AWSデプロイするも、アプリの背景画像が表示されず、CSSやJSが一切機能してない件。

assetsディレクトリ以下がプリコンパイルされてないっぽい。そこで

$rake assets:precompile RAILS_ENV=production

が変わらず。cssも反映されない。。
調べた結果、以下を試す。

$ find app/assets/ -type f -exec touch {} \;
$ rake assets:clobber assets:precompile
$ RAILS_ENV=production rake assets:precompile

んでunicornとNginxを再起動したら
CSSが反映された!

参考:https://teratail.com/questions/231518

0
0
0

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
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?