Very strange behavior of rails assets

Hello People,

I have just deployed an app on Ubuntu 14.04, Rails 5.0.x, Puma, Nginx. Even though I have precompiled assets I am getting the following output:

And ofcourse no javascript and css is not loading and returning 404.

In the very same server I have Rails 4.2.x app which works perfectly. Could any one guess what could have gone wrong?

Be sure you are running in production mode by setting the RAILS_ENV environment variable to production.

Found answer, this was caused due to the use of opal-rails. When I rewrote my app without it (thankfully its the start of the app I was doing), all worked fine. Some one has reported the same issue on stack overflow, but it has not been answered . Thanks a lot to Scott for trying to answer.