In general, having understood that yes how, I will describe the whole situation.
There is a CloudFlare. In his domain settings enabled Development Mode. But hardly CloudFlare here at all affects something.
Go ahead.
If you run the project in development mode, then everything is fine. Recompiles a resource if it was changed and the resource is successfully available at: http://site.ru/assets/application-md5-hash.css
If you run the project in production mode, then there’s some nonsense coming out. I have been dealing with this for several hours and have seen everything ... More in detail:
I
rake assets:precompile, which in turn generated everything I needed in the / public / assets directory. File names and hash in these names converge (source code in the browser + what is on the server).On the site itself, all scripts and styles have a mistake, they say, 404 - there is nothing here. For example, for this style: http://site.ru/assets/application-md5-hash.css . If you prescribe public to assets, it finds the style / script. But this does not solve the problem. Must be available at http://site.ru/assets/ .
After a long time, I began to find a resource, but only application.css, application.js and global.js. But besides them, there are still personal styles / scripts such as, for example, news.css / js or comments.css / js. They still have 404 error.
Next, I upgraded the version in assets.rb. Again executed
rake assets:precompile. Everything returned to the starting point - all have 404 errors. There is nothing.
I touched absolutely nothing in production.rb. It was generated when creating a project - and it has lain until today. Besides, somehow, at the beginning of the project creation, I launched the project in production mode. And all the resources then loaded without problems.
How the damn fix it? Why such nonsense?
config.assets.compile = trueStarted to work. That is, now it finds all the resources ... Can this be regarded as a framework bug? - Colibri