mattconnolly / rails-backup-migrate

A gem providing a rake task for backing up and migrating databases and files between rails instances.
Other
26 stars 16 forks source link

uninitialized constant Mysql #9

Open halida opened 12 years ago

halida commented 12 years ago

here is the trace:

 $ rake site:backup:db --trace
(in /data/workspace/gurudigger)
DEPRECATION WARNING: The InstanceMethods module inside ActiveSupport::Concern will be no longer included automatically. Please define instance methods directly in Gmaps4rails::ActsAsGmappable instead. (called from <top (required)> at /data/workspace/gurudigger/config/application.rb:11)
/home/halida/.rvm/gems/ruby-1.9.3-p125/gems/resque-1.20.0/lib/resque/helpers.rb:5:in `<top (required)>': [DEPRECATION] MultiJson.engine is deprecated and will be removed in the next major version. Use MultiJson.adapter instead.
** Invoke site:backup:db (first_time)
** Invoke site:backup:_save_db_schema (first_time)
** Invoke environment (first_time)
** Invoke disable_rails_admin_initializer (first_time)
** Execute disable_rails_admin_initializer
** Execute environment
** Invoke db:schema:dump (first_time)
** Invoke environment 
** Invoke db:load_config (first_time)
** Invoke rails_env (first_time)
** Execute rails_env
** Execute db:load_config
** Execute db:schema:dump
** Execute site:backup:_save_db_schema
** Invoke site:backup:_save_db_to_yml (first_time)
** Invoke environment 
** Execute site:backup:_save_db_to_yml
rake aborted!
uninitialized constant Mysql
/home/halida/.rvm/gems/ruby-1.9.3-p125/gems/rails-backup-migrate-0.0.11/lib/rails-backup-migrate.rb:118:in `block (4 levels) in save_db_to_yml'
/home/halida/.rvm/gems/ruby-1.9.3-p125/gems/rails-backup-migrate-0.0.11/lib/rails-backup-migrate.rb:116:in `each'
/home/halida/.rvm/gems/ruby-1.9.3-p125/gems/rails-backup-migrate-0.0.11/lib/rails-backup-migrate.rb:116:in `inject'
/home/halida/.rvm/gems/ruby-1.9.3-p125/gems/rails-backup-migrate-0.0.11/lib/rails-backup-migrate.rb:116:in `block (3 levels) in save_db_to_yml'
/home/halida/.rvm/gems/ruby-1.9.3-p125/gems/rails-backup-migrate-0.0.11/lib/rails-backup-migrate.rb:115:in `map!'
/home/halida/.rvm/gems/ruby-1.9.3-p125/gems/rails-backup-migrate-0.0.11/lib/rails-backup-migrate.rb:115:in `block (2 levels) in save_db_to_yml'
/home/halida/.rvm/gems/ruby-1.9.3-p125/gems/rails-backup-migrate-0.0.11/lib/rails-backup-migrate.rb:110:in `open'
/home/halida/.rvm/gems/ruby-1.9.3-p125/gems/rails-backup-migrate-0.0.11/lib/rails-backup-migrate.rb:110:in `block in save_db_to_yml'
/home/halida/.rvm/gems/ruby-1.9.3-p125/gems/rails-backup-migrate-0.0.11/lib/rails-backup-migrate.rb:108:in `each'
/home/halida/.rvm/gems/ruby-1.9.3-p125/gems/rails-backup-migrate-0.0.11/lib/rails-backup-migrate.rb:108:in `save_db_to_yml'
/home/halida/.rvm/gems/ruby-1.9.3-p125/gems/rails-backup-migrate-0.0.11/lib/tasks/rails-backup-migrate.rake:30:in `block (3 levels) in <top (required)>'
/home/halida/.rvm/gems/ruby-1.9.3-p125/gems/rake-0.9.2.2/lib/rake/task.rb:205:in `call'
/home/halida/.rvm/gems/ruby-1.9.3-p125/gems/rake-0.9.2.2/lib/rake/task.rb:205:in `block in execute'
/home/halida/.rvm/gems/ruby-1.9.3-p125/gems/rake-0.9.2.2/lib/rake/task.rb:200:in `each'
/home/halida/.rvm/gems/ruby-1.9.3-p125/gems/rake-0.9.2.2/lib/rake/task.rb:200:in `execute'
/home/halida/.rvm/gems/ruby-1.9.3-p125/gems/rake-0.9.2.2/lib/rake/task.rb:158:in `block in invoke_with_call_chain'
/home/halida/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/1.9.1/monitor.rb:211:in `mon_synchronize'
/home/halida/.rvm/gems/ruby-1.9.3-p125/gems/rake-0.9.2.2/lib/rake/task.rb:151:in `invoke_with_call_chain'
/home/halida/.rvm/gems/ruby-1.9.3-p125/gems/rake-0.9.2.2/lib/rake/task.rb:176:in `block in invoke_prerequisites'
/home/halida/.rvm/gems/ruby-1.9.3-p125/gems/rake-0.9.2.2/lib/rake/task.rb:174:in `each'
/home/halida/.rvm/gems/ruby-1.9.3-p125/gems/rake-0.9.2.2/lib/rake/task.rb:174:in `invoke_prerequisites'
/home/halida/.rvm/gems/ruby-1.9.3-p125/gems/rake-0.9.2.2/lib/rake/task.rb:157:in `block in invoke_with_call_chain'
/home/halida/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/1.9.1/monitor.rb:211:in `mon_synchronize'
/home/halida/.rvm/gems/ruby-1.9.3-p125/gems/rake-0.9.2.2/lib/rake/task.rb:151:in `invoke_with_call_chain'
/home/halida/.rvm/gems/ruby-1.9.3-p125/gems/rake-0.9.2.2/lib/rake/task.rb:144:in `invoke'
/home/halida/.rvm/gems/ruby-1.9.3-p125/gems/rake-0.9.2.2/lib/rake/application.rb:116:in `invoke_task'
/home/halida/.rvm/gems/ruby-1.9.3-p125/gems/rake-0.9.2.2/lib/rake/application.rb:94:in `block (2 levels) in top_level'
/home/halida/.rvm/gems/ruby-1.9.3-p125/gems/rake-0.9.2.2/lib/rake/application.rb:94:in `each'
/home/halida/.rvm/gems/ruby-1.9.3-p125/gems/rake-0.9.2.2/lib/rake/application.rb:94:in `block in top_level'
/home/halida/.rvm/gems/ruby-1.9.3-p125/gems/rake-0.9.2.2/lib/rake/application.rb:133:in `standard_exception_handling'
/home/halida/.rvm/gems/ruby-1.9.3-p125/gems/rake-0.9.2.2/lib/rake/application.rb:88:in `top_level'
/home/halida/.rvm/gems/ruby-1.9.3-p125/gems/rake-0.9.2.2/lib/rake/application.rb:66:in `block in run'
/home/halida/.rvm/gems/ruby-1.9.3-p125/gems/rake-0.9.2.2/lib/rake/application.rb:133:in `standard_exception_handling'
/home/halida/.rvm/gems/ruby-1.9.3-p125/gems/rake-0.9.2.2/lib/rake/application.rb:63:in `run'
/home/halida/.rvm/gems/ruby-1.9.3-p125/gems/rake-0.9.2.2/bin/rake:33:in `<top (required)>'
/home/halida/.rvm/gems/ruby-1.9.3-p125/bin/rake:19:in `load'
/home/halida/.rvm/gems/ruby-1.9.3-p125/bin/rake:19:in `<main>'
Tasks: TOP => site:backup:db => site:backup:_save_db_to_yml

here is my gem:

gem 'mysql2', '>= 0.3'

is it my problem?

mattconnolly commented 12 years ago

It seems a change I made recently for improving date and time fields with mysql works only with the mysql gem and not the mysql2 gem.

Is it possible you can use the mysql gem instead of mysql2. This is something that should be fixed, but if you can change it temporarily it might mean that you can use it before i fix the issue.

Matt.

halida commented 12 years ago

here is the fix I made:

https://github.com/halida/rails-backup-migrate/commit/4f5acaa2da218dc02742f7c490cd6a63eeb0879a