Skip to content
Hongli Lai edited this page Aug 13, 2014 · 3 revisions

Sometimes when using passenger for Rails in development mode behind Apache, my static resources get cached by the server. How do I disable this behaviour ?

If a file exists in /public Passenger passes the request to Apache to handle. Apache is often setup to cache these files by default, so any modifications to javascript or css are not immediately reflected, regardless of development mode. In order to turn off this caching, you must add the following directives to your application declaration

EnableMMAP Off
EnableSendfile Off

so for example :

<VirtualHost *:80>
    ServerAdmin [email protected]
    ServerName www.example.com
    DocumentRoot /webapps/example/current
    EnableMMAP Off
    EnableSendfile Off
</VirtualHost>

Should work.

The app fails to load bundler/setup during startup

See [this StackOverflow question](http://stackoverflow.com/questions/25228777/rails-nginx-passenger-cannot-checkout-session-because-a-spawning-error-occurred)