The Rails application is not working in the production environment, so-called production environment.
In the test environment, css, image, and javascript are successfully compiled and reflected each time, but in the production environment, only css is not reflected.
(assets:precompile is complete and loaded correctly, but it doesn't work at all.)
As a test,
The environment is as follows:I am troubled that only css is not loaded.
Thank you for your cooperation.
Of course, I think I have already checked it, but
config.assets.css_compressor=:ass
config.assets.enabled = true
config.assets.compile=true
<Application Route Directory>/config/environments/production.rb
Configured in and
$touch<Application Route Directory >/tmp/restart.txt
Why don't you delete the contents of tmp/cache and restart the web server?When it still doesn't work
rake assemblies:precompile
When I try things like that, I feel that they work well.
I think I've already done it, but I remember that the browser cache was erased so that it wouldn't be confusing, and the display would be updated if I accessed it several times until the update was reflected.
I'm sorry that I didn't know exactly how it works around here, so I only answered from experience, but I hope I can be of help.
Most browsers have the ability to read the source, so it would be easier to view the source and check the file contents of the CSS file in the head tag (link tag).
How about taking resources to S3 using AssetSync?
Setting the bucket policy properly should help isolate the problem.
I rm the public/assets once and precompile again and got css.
I have tried many things, but I think there is a json file called .sprockets-manifest under public/assets, and I am managing the version of the precompile file, but I think it was because it was old.
So I deleted everything and tried again.I would appreciate it if you could help me.
574 Who developed the "avformat-59.dll" that comes with FFmpeg?
572 rails db:create error: Could not find mysql2-0.5.4 in any of the sources
915 When building Fast API+Uvicorn environment with PyInstaller, console=False results in an error
611 GDB gets version error when attempting to debug with the Presense SDK (IDE)
© 2024 OneMinuteCode. All rights reserved.