Announcement (2017-05-07): www.ruby-forum.com is now read-only since I
unfortunately do not have the time to support and maintain the forum any
more. Please see rubyonrails.org/community and ruby-lang.org/en/community
for other Rails- und Ruby-related community platforms.

Hi,
I'm wondering if anyone else has experienced this...
I have a controller with three actions, and I want to cache only the
action named index. At the top of the controller I have:
caches_page :index
The index action loads and caches fine, however the other two actions
in the controller now render as blank pages. In my development log, i
get this:
Processing MyController#blank_page (for 127.0.0.1 at 2007-04-02
17:10:06) [GET]
Session ID: 43b02585893271eaf440ad31061176bf
Parameters: {"action"=>"blank_page", "controller"=>"my"}
Filter chain halted as
[#<ActionController::Filters::ClassMethods::ProcFilter:0x33d608c
@filter=#<Proc:0x033d61e0@(eval):1>>] returned false.
Completed in 0.00015 (6797 reqs/sec) | [http://0.0.0.0/my/blank_page]
I understand that when the filter chain is halted like that, there a
before filter returning false for some reason, but I disabled the only
before filter I have in the application when this started happening,
so I know it's not that returning false.
Stranger still (to me at least), if I change the "caches_page"
declaration at the top of the controller to cache all the actions, all
the actions render blank, with that same message in the logs.
Any ideas as to what might be happening here? I've gotten this error
on Rails 1.2.1 and 1.2.3.
Thanks in advance.
Best, PJ

PJ,
Do you specify in your environment.rb where the cached pages are
supposed to be held? Mine looks a little something like this:
config.action_controller.page_cache_directory = RAILS_ROOT + "/public/
cache/"
Sincerely,
Robert Dempsey
http://www.techcfl.comhttp://www.railsforall.org

Robert,
Thanks for your reply.
Currently, I do specify the following in my environment.rb
config.action_controller.page_cache_directory = RAILS_ROOT+"/public/
cache/"
However, it happens whether or not I do this. This has happened in
two other apps of mine where I'm not specifying a custom cache
directory.
Any ideas?
Best, PJ

PJ,
One other thing to check is whether or not you have write access to
that directory. Also, does caching work in development mode? Can you
show come log output for the action? That may help us to figure this
out.
- Robert

I finally discovered that the issue was being caused by the
unobtrusive javascript plugin. A quick look on their google group
revealed a solution. FYI, the fix is in the trunk but not included in
the current release.
http://groups.google.com/group/ujs4rails/browse_th...