Hi, could someone shed a light on this please - when and how assets are get copied to public? I’m using Passenger but also tried WEBrick. Got some of my assets copied but when I add some new images or js to assets I can’t see them in public hence they are not accessible from templates. Tried reloading, restarting passenger, restarting WEBricks.
Welcome @smarthouse,
Assuming you haven’t touched the default configurations, have you issued the precompile command using the production environment? Like so:
HANAMI_ENV=production hanami assets precompile
Thanks @mereghost ! This command has helped and copied the assets both the original name and also copied to asset-hash which I suppose are used for production by default.
So does it mean assets are not copied anyhow automatically? The reason I’m asking I did not run the above command but still had some of the assets copied and now I’m not sure why they were copied.
What’s a reason for setting the ENV in the command, I see no difference in how the assets are processed and get hashed file name if I run with ENV=development,ENV=production or if I miss that at all.
@smarthouse Hi and welcome!
Is your problem related to production environment or is it about your development workflow? Thanks.