Locomotivecms Assets in Production

无人久伴 提交于 2019-12-04 20:20:14

The problem was not with Locomotivecms, it was a rails thing that I did not know about. I had following in production.rb:

config.serve_static_assets = false

This setting is right if you are running your app in Nginx or Apache in production. In which case they server the public assets. But if you are running your app on simply a rails server in production, like unicorn, webbrick, thin etc. then you need to set this setting to true in order for the rails server to serve assets from public folder. I set this to true, started the server (bundle exec unicorn_rails -E production) the assets were served fine.

More explanation on config.serve_static_assets can be found here: http://guides.rubyonrails.org/configuring.html

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!