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