Closed moonhouse closed 12 years ago
On restore heroku-mongo-backup expects there to be a defaults entry in mongoid.yml. If it doesn't exist you get the following error.
defaults
± % RAILS_ENV=stage rake --trace mongo:restore FILE=2012-05-23_08-59-51.gz !4515 DEPRECATION WARNING: ActiveSupport::Memoizable is deprecated and will be removed in future releases, simply use Ruby memoization pattern instead. (called from <top (required)> at /Users/david.hall/work/Annotag/config/application.rb:13) /Users/david.hall/work/Annotag/config/application.rb:22: warning: already initialized constant DEFAULT_HOST ** Invoke mongo:restore (first_time) ** Invoke environment (first_time) ** Execute environment ** Execute mongo:restore rake aborted! undefined methodmerge!' for nil:NilClass /Users/david.hall/.rvm/gems/ruby-1.9.2-p290@annotag/gems/heroku-mongo-backup-0.3.6/lib/ heroku_mongo_backup.rb:145:in initialize' /Users/david.hall/.rvm/gems/ruby-1.9.2-p290@annotag/gems/heroku-mongo-backup-0.3.6/lib/ tasks/heroku_mongo_backup.rake:14:innew' /Users/david.hall/.rvm/gems/ruby-1.9.2-p290@annotag/gems/heroku-mongo-backup-0.3.6/lib/ tasks/heroku_mongo_backup.rake:14:in block (2 levels)
± % RAILS_ENV=stage rake --trace mongo:restore FILE=2012-05-23_08-59-51.gz !4515 DEPRECATION WARNING: ActiveSupport::Memoizable is deprecated and will be removed in future releases, simply use Ruby memoization pattern instead. (called from <top (required)> at /Users/david.hall/work/Annotag/config/application.rb:13) /Users/david.hall/work/Annotag/config/application.rb:22: warning: already initialized constant DEFAULT_HOST ** Invoke mongo:restore (first_time) ** Invoke environment (first_time) ** Execute environment ** Execute mongo:restore rake aborted! undefined method
initialize' /Users/david.hall/.rvm/gems/ruby-1.9.2-p290@annotag/gems/heroku-mongo-backup-0.3.6/lib/ tasks/heroku_mongo_backup.rake:14:in
block (2 levels)
I can fix this by adding a dummy entry like
`defaults: whatever: nehe```
in my mongoid.yml file but I think defaults should be initialized to an empty hash if it couldn't be read from mongoid.yml.
mongoid.yml
Hello David, this is good idea! You can try to fix that by yourself and send a pull request. I'll add that to the main branch. Sorry for no reply for a while didn't have a chance to answer.
On restore heroku-mongo-backup expects there to be a
defaults
entry in mongoid.yml. If it doesn't exist you get the following error.± % RAILS_ENV=stage rake --trace mongo:restore FILE=2012-05-23_08-59-51.gz !4515 DEPRECATION WARNING: ActiveSupport::Memoizable is deprecated and will be removed in future releases, simply use Ruby memoization pattern instead. (called from <top (required)> at /Users/david.hall/work/Annotag/config/application.rb:13) /Users/david.hall/work/Annotag/config/application.rb:22: warning: already initialized constant DEFAULT_HOST ** Invoke mongo:restore (first_time) ** Invoke environment (first_time) ** Execute environment ** Execute mongo:restore rake aborted! undefined method
merge!' for nil:NilClass /Users/david.hall/.rvm/gems/ruby-1.9.2-p290@annotag/gems/heroku-mongo-backup-0.3.6/lib/ heroku_mongo_backup.rb:145:ininitialize' /Users/david.hall/.rvm/gems/ruby-1.9.2-p290@annotag/gems/heroku-mongo-backup-0.3.6/lib/ tasks/heroku_mongo_backup.rake:14:in
new' /Users/david.hall/.rvm/gems/ruby-1.9.2-p290@annotag/gems/heroku-mongo-backup-0.3.6/lib/ tasks/heroku_mongo_backup.rake:14:inblock (2 levels)
I can fix this by adding a dummy entry like
`defaults: whatever: nehe```
in my
mongoid.yml
file but I think defaults should be initialized to an empty hash if it couldn't be read from mongoid.yml.