Created
January 22, 2009 19:16
-
-
Save migane/50675 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
rake db:automigrate | |
(in /PortefeuillePartage/Ruby/RubyLearning/Merb/ruby_bookshop) | |
Loading init file from /PortefeuillePartage/Ruby/RubyLearning/Merb/ruby_bookshop/config/init.rb | |
Loading /PortefeuillePartage/Ruby/RubyLearning/Merb/ruby_bookshop/config/environments/development.rb | |
Loading init file from /PortefeuillePartage/Ruby/RubyLearning/Merb/ruby_bookshop/config/init.rb | |
Loading /PortefeuillePartage/Ruby/RubyLearning/Merb/ruby_bookshop/config/environments/rake.rb | |
rake aborted! | |
default store already setup | |
/PortefeuillePartage/Ruby/RubyLearning/Merb/ruby_bookshop/rakefile:24 | |
(See full trace by running task with --trace) | |
And I have in dependencies.rb: | |
... | |
dependency("merb-cache", merb_gems_version) do | |
Merb::Cache.setup do | |
register(Merb::Cache::FileStore) | |
end | |
end | |
... | |
And in init.rb: | |
... | |
Merb::BootLoader.before_app_loads do | |
# This will get executed after dependencies have been loaded but before your app's classes have loaded. | |
end | |
... | |
Should not I put your suggestion here? | |
Merb::BootLoader.before_app_loads do | |
# This will get executed after dependencies have been loaded but before your app's classes have loaded. | |
end | |
instead of in development.rb, production.rb, etc? | |
I've tried all the suggestions in init.rb, in development.rb, nothing works. | |
Here's my last try with: | |
development.rb: | |
Merb.logger.info("Loaded DEVELOPMENT Environment...") | |
Merb::Config.use { |c| | |
c[:exception_details] = true | |
c[:reload_templates] = true | |
c[:reload_classes] = true | |
c[:reload_time] = 0.5 | |
c[:ignore_tampered_cookies] = true | |
c[:log_auto_flush ] = true | |
c[:log_level] = :debug | |
c[:log_stream] = STDOUT | |
c[:log_file] = nil | |
# Or redirect logging into a file: | |
# c[:log_file] = Merb.root / "log" / "development.log" | |
} | |
Merb::BootLoader.after_app_loads do | |
Merb::Cache.setup do | |
unless defined?(CACHE_SETUP) # HACK: rake tasks are loading this file twice | |
register(:memcached, Merb::Cache::MemcachedStore) | |
register(:default, Merb::Cache::AdhocStore[:memcached]) | |
register(:file_store, Merb::Cache::FileStore, Merb.root_path / "tmp/cache") | |
CACHE_SETUP = true | |
end | |
end | |
end | |
and the rake task with trace: | |
rake --trace db:automigrate | |
(in /PortefeuillePartage/Ruby/RubyLearning/Merb/ruby_bookshop) | |
Loading init file from /PortefeuillePartage/Ruby/RubyLearning/Merb/ruby_bookshop/config/init.rb | |
Loading /PortefeuillePartage/Ruby/RubyLearning/Merb/ruby_bookshop/config/environments/development.rb | |
** Invoke db:automigrate (first_time) | |
** Invoke merb_env (first_time) | |
** Execute merb_env | |
Loading init file from /PortefeuillePartage/Ruby/RubyLearning/Merb/ruby_bookshop/config/init.rb | |
Loading /PortefeuillePartage/Ruby/RubyLearning/Merb/ruby_bookshop/config/environments/rake.rb | |
rake aborted! | |
default store already setup | |
/usr/local/lib/ruby/gems/1.8/gems/merb-cache-1.0.8.1/lib/merb-cache/cache.rb:66:in `register' | |
./config/dependencies.rb:12 | |
/usr/local/lib/ruby/gems/1.8/gems/merb-cache-1.0.8.1/lib/merb-cache/cache.rb:14:in `instance_eval' | |
/usr/local/lib/ruby/gems/1.8/gems/merb-cache-1.0.8.1/lib/merb-cache/cache.rb:14:in `setup' | |
/usr/local/lib/ruby/gems/1.8/gems/merb-core-1.0.8.1/lib/merb-core/bootloader.rb:583:in `call' | |
/usr/local/lib/ruby/gems/1.8/gems/merb-core-1.0.8.1/lib/merb-core/bootloader.rb:583:in `run' | |
/usr/local/lib/ruby/gems/1.8/gems/merb-core-1.0.8.1/lib/merb-core/bootloader.rb:583:in `each' | |
/usr/local/lib/ruby/gems/1.8/gems/merb-core-1.0.8.1/lib/merb-core/bootloader.rb:583:in `run' | |
/usr/local/lib/ruby/gems/1.8/gems/merb-core-1.0.8.1/lib/merb-core/bootloader.rb:99:in `run' | |
/usr/local/lib/ruby/gems/1.8/gems/merb-core-1.0.8.1/lib/merb-core/server.rb:172:in `bootup' | |
/usr/local/lib/ruby/gems/1.8/gems/merb-core-1.0.8.1/lib/merb-core/server.rb:42:in `start' | |
/usr/local/lib/ruby/gems/1.8/gems/merb-core-1.0.8.1/lib/merb-core.rb:170:in `start' | |
/usr/local/lib/ruby/gems/1.8/gems/merb-core-1.0.8.1/lib/merb-core.rb:183:in `start_environment' | |
/PortefeuillePartage/Ruby/RubyLearning/Merb/ruby_bookshop/rakefile:24 | |
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:617:in `call' | |
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:617:in `execute' | |
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:612:in `each' | |
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:612:in `execute' | |
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:578:in `invoke_with_call_chain' | |
/usr/local/lib/ruby/1.8/monitor.rb:242:in `synchronize' | |
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:571:in `invoke_with_call_chain' | |
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:588:in `invoke_prerequisites' | |
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:585:in `each' | |
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:585:in `invoke_prerequisites' | |
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:577:in `invoke_with_call_chain' | |
/usr/local/lib/ruby/1.8/monitor.rb:242:in `synchronize' | |
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:571:in `invoke_with_call_chain' | |
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:564:in `invoke' | |
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:2019:in `invoke_task' | |
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:1997:in `top_level' | |
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:1997:in `each' | |
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:1997:in `top_level' | |
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:2036:in `standard_exception_handling' | |
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:1991:in `top_level' | |
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:1970:in `run' | |
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:2036:in `standard_exception_handling' | |
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:1967:in `run' | |
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.3/bin/rake:31 | |
/usr/local/bin/rake:19:in `load' | |
/usr/local/bin/rake:19 | |
Any idea how I can get it work? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment