I have asked this question in the locomotivecms google groups, but haven't gotten any useful response yet. So, trying out here. I have a feeling the issue is not just a rails issue but has something to do with how the locomotivecms engine is implemented.
I installed the locomotivecms app as per the instructions here - http://doc.locomotivecms.com/guides/get-started/install-engine
The app runs fine in development mode.
I then precompiled the assets and started it in production mode (bundle exec unicorn_rails -E production
). Now when I open the app in the browser, the stylesheets are not rendered. I have checked the public/assets and the fingerprinted stylesheet requested by the browser is present there. Yet it is not rendered correctly. This is what the chrome view resources shows:
It looks as if the stylesheet contains html. If I open it from the public/assets folder it contains css. I think Locomotive is intercepting the request and somehow not returning the css. Locomotive is open source, their code is on github - https://github.com/locomotivecms/engine.