現状
EC2上にRailsアプリケーションをデプロイし、assets:precompileを行いました。
しかし、publicディレクトリにassetsディレクトリが展開されず、プリコンパイル済みのファイルが見つかりません。
エラーも確認できません。
assets:precompileした際のログ
yarn install v1.22.5 [1/4] Resolving packages... success Already up-to-date. Done in 1.37s. I, [2021-07-07T23:47:05.104421 #1] INFO -- : Writing /myapp/public/assets/manifest-b4bf6e57a53c2bdb55b8998cc94cd00883793c1c37c5e5aea3ef6749b4f6d92b.js I, [2021-07-07T23:47:05.106134 #1] INFO -- : Writing /myapp/public/assets/manifest-b4bf6e57a53c2bdb55b8998cc94cd00883793c1c37c5e5aea3ef6749b4f6d92b.js.gz I, [2021-07-07T23:47:05.107094 #1] INFO -- : Writing /myapp/public/assets/bokeh-1569531_1920-f62359bea49253279244ca183dc3cd864cc5ee9db4f014d5b6fde5e111f899bf.jpg I, [2021-07-07T23:47:05.108435 #1] INFO -- : Writing /myapp/public/assets/movie-918655_1920-051608671eae8e69643a68e4e1c584d632976b572f23b6096bcf3e78fa534364.jpg I, [2021-07-07T23:47:05.116231 #1] INFO -- : Writing /myapp/public/assets/application-a969f5cd9f6d7b0d33ba1a2498438e997b7e131b8a14eb4c5d8a022724136181.css I, [2021-07-07T23:47:05.116859 #1] INFO -- : Writing /myapp/public/assets/application-a969f5cd9f6d7b0d33ba1a2498438e997b7e131b8a14eb4c5d8a022724136181.css.gz I, [2021-07-07T23:47:05.122931 #1] INFO -- : Writing /myapp/public/assets/bootstrap_import-e9f30369f6cb698d0950027fcc3e0fd46a30b5585188f37678e2b9b68cf7acd8.css I, [2021-07-07T23:47:05.123572 #1] INFO -- : Writing /myapp/public/assets/bootstrap_import-e9f30369f6cb698d0950027fcc3e0fd46a30b5585188f37678e2b9b68cf7acd8.css.gz Compiling... Compiled all packs in /myapp/public/packs Hash: 0613a9b3364c08fc0d50 Version: webpack 4.46.0 Time: 2363ms Built at: 07/07/2021 11:47:12 PM Asset Size Chunks Chunk Names js/application-12f04455053704825e8e.js 69.3 KiB 0 [emitted] [immutable] application js/application-12f04455053704825e8e.js.br 15.4 KiB [emitted] js/application-12f04455053704825e8e.js.gz 17.8 KiB [emitted] js/application-12f04455053704825e8e.js.map 205 KiB 0 [emitted] [dev] application js/application-12f04455053704825e8e.js.map.br 43.8 KiB [emitted] js/application-12f04455053704825e8e.js.map.gz 50.9 KiB [emitted] manifest.json 364 bytes [emitted] manifest.json.br 132 bytes [emitted] manifest.json.gz 142 bytes [emitted] Entrypoint application = js/application-12f04455053704825e8e.js js/application-12f04455053704825e8e.js.map [0] (webpack)/buildin/module.js 552 bytes {0} [built] [4] ./app/javascript/packs/application.js 480 bytes {0} [built] [5] ./app/javascript/channels/index.js 205 bytes {0} [built] [6] ./app/javascript/channels sync _channel.js$ 160 bytes {0} [built] + 3 hidden modules
試したこと
プリコンパイル済みのファイルの配置先を調べましたが、public/assets/でした
$> Rails.application.config.assets.prefix
=> "/assets"
あなたの回答
tips
プレビュー