merb-cache DEFAULT_OPTIONS created on class load
Reported by Gabriel Handford | April 29th, 2008 @ 07:50 PM | in 1.0 (Nearish Future)
In merb-cache.rb the DEFAULT_OPTIONS is initialized on class load but Merb.root isn't set at that point.
This causes merb to fail when it can't find the cache directory, and you are using the -m argument, and not starting from the project directory (like via an init script).
A possible fix is to wait to load the defaults until cache start:
def default_config
@default_config ||= {
:cache_html_directory => Merb.dir_for(:public) / "cache",
:store => "file",
:cache_directory => Merb.root_path("tmp/cache"),
}
Then in the start method:
default_config.merge(Merb::Plugins.config[:merb_cache] || {})
Comments and changes to this ticket
-
Michael Klishin (antares) May 11th, 2008 @ 07:48 AM
- → Milestone changed from to 1.0 (Nearish Future)
- → State changed from new to open
Please Login or create a free account to add a new comment.
You can update this ticket by sending an email to from your email client. (help)
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »
