I've an EC2 instance using the usual stack of Apache, Passenger, and Rails. The application is running being produced, so Javascript files are cached into an all.js file.

Passenger is set up to pre-start the applying instance while using PassengerPreStart directive.

Occasionally, the all.js that's produced by Rails in public/javascripts has got the wrong permissions, 0600 for that deployment user. It's said to be 0640, to ensure that Apache can serve the files (they are within the same group, www-data).

Have you got any explanation why this really is happening? Can there be any problem known with PassengerPreStart and Rails' resource caching?

I am confident this really is due to the timestamps which come following the assets. Should you perform a view source the amounts following the resource/files really are a timestamp and i believe the browsers get confused, or rails messes up or something like that.

You alter the default from the timestamp for an empty string but putting the next code somewhere inside your Rails application.



Which will place it for an empty string. Observe how that goes.