Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow page cache location to be set to a Pathname #181

Closed
wants to merge 1 commit into from

Conversation

indirect
Copy link
Member

@indirect indirect commented Feb 5, 2011

Now that Rails.root is a Pathname, it seems like you should be able to do this:

config.action_controller.page_cache_directory = Rails.root.join("public/cache")

This patch (and test) allow you to do that. Without it, you get inexplicable and impenetrable 500 errors with logs that (super helpfully) look like this:

Started GET "/" for 127.0.0.1 at Sat Feb 05 15:19:06 -0800 2011
  Processing by MediaController#index as XML
Rendered media/index.xml.builder (0.2ms)
Write page /index.html (0.4ms)
Completed   in 6ms

Errno::ENOENT (No such file or directory - ):

For example, page_cache_directory = Rails.root.join("public/cache")
@spastorino
Copy link
Contributor

Pushed, thanks.

matthewd pushed a commit that referenced this pull request Apr 24, 2018
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants