解決したいこと
The asset "application.css" is not present in the asset pipeline.
のエラーをなくしたい
状況
LightsailにRailsを乗せてデプロイしようとしている
nginx, unicornは動いたがurlを開くと
We're sorry, but something went wrong.
の表示
log/production.logを見るとタイトルのエラーが出ていた
https://qiita.com/metheglin/items/c5c756246b7afbd34ae2
こちらの記事を参考に調査を進め、おそらくprecompileは成功している様子
※public/assetsの中身
application-f0ad22231c8d84d2e162e20a155d6129179d4ff7bde8f55a3f9010447d7ff81a.css application-f0ad22231c8d84d2e162e20a155d6129179d4ff7bde8f55a3f9010447d7ff81a.css.gz manifest-cadda289ef9c70eaa0879a36e6263cb33f7523a16b3ef862e0b8609cdc2bdab1.js manifest-cadda289ef9c70eaa0879a36e6263cb33f7523a16b3ef862e0b8609cdc2bdab1.js.gz .sprockets-manifest-2587fd779e202a63fef6d25948a3fd3a.json test_page-d0ff5974b6aa52cf562bea5921840c032a860a91a3512f7fe8f768f6bbe005f6.css test_page-d0ff5974b6aa52cf562bea5921840c032a860a91a3512f7fe8f768f6bbe005f6.css.gz
ファイル名直打ちでのアクセスも通っています
5はHTMLのソースを見ることができず確認できていません
どなたか原因の思い当たる方はいらっしゃいませんか?
参考
application.html.erb
<!DOCTYPE html> <html> <head> <title>SchedulingTool</title> <%= csrf_meta_tags %> <%= csp_meta_tag %> <%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track': 'reload' %> <%= javascript_pack_tag 'application', 'data-turbolinks-track': 'reload' %> </head> <body> <%= yield %> </body> </html>
application.css
/* * This is a manifest file that'll be compiled into application.css, which will include all the files * listed below. * * Any CSS and SCSS file within this directory, lib/assets/stylesheets, or any plugin's * vendor/assets/stylesheets directory can be referenced here using a relative path. * * You're free to add application-wide styles to this file and they'll appear at the bottom of the * compiled file so the styles you add here take precedence over styles defined in any other CSS/SCSS * files in this directory. Styles in this file should be added after the last require_* statement. * It is generally better to create a new file per style scope. * *= require_tree . *= require_self */
あなたの回答
tips
プレビュー