Topic: Problem with assets

I have problem with assets, a javascript file. It works in developing mode but have problem in production. Why such a difference? What comes to your mind intuitively of what could be wrong?

Re: Problem with assets

Hi
You probably have to precompile your assets...
Cheers

Re: Problem with assets

anso wrote:

Hi
You probably have to precompile your assets...
Cheers

I did that. Not sure why it doesn't work but it must be something about compiling. I will try to turn it off by setting config.assets.compile = false. Will that be enough? Do I need to do something after that?

Re: Problem with assets

Solved it. It was something with permissions. The app root was located outside nginx root under another user (debian). When moved to server root it worked.

Re: Problem with assets

Still have problems from time to time. Must be something with compiling. Do I need to do rake assets:precompile RAILS_ENV=production after I upload new images or js to the server?

Btw, do I need to compile? Seems to be a lot of problems with this since rails 3, or whenever that changed.

Last edited by palb (2013-05-28 04:33:34)