I’ve deployed my rails app with the Asset Pipeline enabled like so inside the application.rb file:
# Enable the asset pipeline
config.assets.enabled = true
When I checking, I can see the files have been processed by the compiler inside the public/assets directory but when I browser the website none of the assets can be resolved by the browser. If I directly access the assets I will see a 404 message by Nginx.
Can someone tell me what’s going on?
Even though the answers above were good that wasn’t my problem. Rails was doing the write thing except Nginx wasn’t configured properly. My Nginx config was pointing to the main application directory instead of the
publicdirectory.So it was originally:
when it should have been this: