I am serving a Rails 3 application from a subdirectory with Passenger and Apache:
<VirtualHost *:80>
RackBaseURI /streamspons
<Directory /var/www/html/streamspons>
AllowOverride all
Options -MultiViews
</Directory>
</VirtualHost>
In my controller I cache a page:
caches_page :banner
When the #banner action is called, the page is written out to public/, but inside of another directory named for the app’s subdirectory (in other words, the entire request string including the subdirectory is in the cache path):
Started GET "/streamspons/decks/2/banner.js"
...
Write page /var/www/public/apps/streamspons/releases/20110316162902/public/streamspons/decks/2/banner.js
When this action is requested again, it misses the cache and runs the action again because the cached page should be at public/decks/2/banner.js instead of public/streamspons/decks/2/banner.js.
Where am I going wrong?
In Rails 3.0.1 I added this to my app/controllers/application_controller.rb:
In latest Rails this might look like: