I found this in a ticket on lighthouse, to basically wrap the cache
config with a check to see if it's already setup or not. Change your
code to look like this:
Merb::BootLoader.after_app_loads do
Merb::Cache.setup do
unless defined? CACHE_SETUP
register(:default, Merb::Cache::FileStore, :dir =>
Merb.root / :tmp / :cache)
end
CACHE_SETUP = true
end
end
And it should no longer complain about the store being set up.
Bill
On Jan 15, 5:03 pm, "Rue the Ghetto" <[email protected]> wrote:
> Hey,
> I am using Merb 1.0.7.1 with ActiveRecord 2.2.2. I have the default cache
> setup like so in config/init.rb
>
> Merb::BootLoader.after_app_loads do
> Merb::Cache.setup do
> register(:default, Merb::Cache::FileStore, :dir => Merb.root / :tmp /
> :cache)
> end
> end
>
> Caching is working and when I run bin/merb, bin/merb -i, or bin/merb-gen
> everything works smoothly. When I run bin/rake to migrate my database I get
> an error:
>
> rake aborted!
> default store already setup
>
> In the log, it looks like init.rb is getting loaded twice. So, it makes
> sense that the error is getting thrown. I am not sure why migration rake is
> causing the system to load twice.
>
> Anyone have a clue?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"merb" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [email protected]
For more options, visit this group at http://groups.google.com/group/merb?hl=en
-~----------~----~----~----~------~----~------~--~---