Today 25 Feb I hav beene updating my gems in Ruby on Rails and now I have some problems that I don't understand.
Have you got any idea? I have mysql2, version 0.4.3, and active record 4.2.3
Here the error: rake aborted! Gem::LoadError: Specified 'mysql2' for database adapter, but the gem is not loaded. Add gem 'mysql2'
to your Gemfile (and ensure its version is at the minimum required by ActiveRecord). /var/lib/gems/2.1.0/gems/activerecord-4.2.3/lib/active_record/connection_adapters/connection_specification.rb:177:in rescue in spec' /var/lib/gems/2.1.0/gems/activerecord-4.2.3/lib/active_record/connection_adapters/connection_specification.rb:174:in
spec' /var/lib/gems/2.1.0/gems/activerecord-4.2.3/lib/active_record/connection_handling.rb:50:in establish_connection' /var/lib/gems/2.1.0/gems/activerecord-4.2.3/lib/active_record/railtie.rb:120:in
block (2 levels) in ' /var/lib/gems/2.1.0/gems/activesupport-4.2.3/lib/active_support/lazy_load_hooks.rb:38:in instance_eval' /var/lib/gems/2.1.0/gems/activesupport-4.2.3/lib/active_support/lazy_load_hooks.rb:38:in
execute_hook' /var/lib/gems/2.1.0/gems/activesupport-4.2.3/lib/active_support/lazy_load_hooks.rb:45:in block in run_load_hooks' /var/lib/gems/2.1.0/gems/activesupport-4.2.3/lib/active_support/lazy_load_hooks.rb:44:in
each' /var/lib/gems/2.1.0/gems/activesupport-4.2.3/lib/active_support/lazy_load_hooks.rb:44:in run_load_hooks' /var/lib/gems/2.1.0/gems/activerecord-4.2.3/lib/active_record/base.rb:315:in
' /var/lib/gems/2.1.0/gems/activerecord-4.2.3/lib/active_record/base.rb:26:in <top (required)>' /var/lib/gems/2.1.0/gems/apartment-1.0.2/lib/apartment.rb:56:in
connection_class' /var/lib/gems/2.1.0/gems/apartment-1.0.2/lib/apartment/tenant.rb:64:in config' /var/lib/gems/2.1.0/gems/apartment-1.0.2/lib/apartment/tenant.rb:28:in
adapter' /var/lib/gems/2.1.0/gems/apartment-1.0.2/lib/apartment/tenant.rb:19:in init' /var/lib/gems/2.1.0/gems/apartment-1.0.2/lib/apartment/railtie.rb:31:in
block in ' /var/lib/gems/2.1.0/gems/activesupport-4.2.3/lib/active_support/callbacks.rb:444:in instance_exec' /var/lib/gems/2.1.0/gems/activesupport-4.2.3/lib/active_support/callbacks.rb:444:in
block in make_lambda' /var/lib/gems/2.1.0/gems/activesupport-4.2.3/lib/active_support/callbacks.rb:190:in call' /var/lib/gems/2.1.0/gems/activesupport-4.2.3/lib/active_support/callbacks.rb:190:in
block in simple' /var/lib/gems/2.1.0/gems/activesupport-4.2.3/lib/active_support/callbacks.rb:502:in call' /var/lib/gems/2.1.0/gems/activesupport-4.2.3/lib/active_support/callbacks.rb:502:in
block in call' /var/lib/gems/2.1.0/gems/activesupport-4.2.3/lib/active_support/callbacks.rb:502:in each' /var/lib/gems/2.1.0/gems/activesupport-4.2.3/lib/active_support/callbacks.rb:502:in
call' /var/lib/gems/2.1.0/gems/activesupport-4.2.3/lib/active_support/callbacks.rb:88:in run_callbacks' /var/lib/gems/2.1.0/gems/actionpack-4.2.3/lib/action_dispatch/middleware/reloader.rb:83:in
prepare!' /var/lib/gems/2.1.0/gems/actionpack-4.2.3/lib/action_dispatch/middleware/reloader.rb:55:in prepare!' /var/lib/gems/2.1.0/gems/railties-4.2.3/lib/rails/application/finisher.rb:50:in
block in ' /var/lib/gems/2.1.0/gems/railties-4.2.3/lib/rails/initializable.rb:30:in instance_exec' /var/lib/gems/2.1.0/gems/railties-4.2.3/lib/rails/initializable.rb:30:in
run' /var/lib/gems/2.1.0/gems/railties-4.2.3/lib/rails/initializable.rb:55:in block in run_initializers' /var/lib/gems/2.1.0/gems/railties-4.2.3/lib/rails/initializable.rb:54:in
run_initializers' /var/lib/gems/2.1.0/gems/railties-4.2.3/lib/rails/application.rb:352:in initialize!' /home/luca/cmonrails/cmonrails/config/environment.rb:5:in
' /var/lib/gems/2.1.0/gems/railties-4.2.3/lib/rails/application.rb:328:in require' /var/lib/gems/2.1.0/gems/railties-4.2.3/lib/rails/application.rb:328:in
require_environment!' /var/lib/gems/2.1.0/gems/railties-4.2.3/lib/rails/application.rb:457:in block in run_tasks_blocks' Gem::LoadError: can't activate mysql2 (~> 0.3.13), already activated mysql2-0.4.2. Make sure all dependencies are added to Gemfile. /var/lib/gems/2.1.0/gems/activerecord-4.2.3/lib/active_record/connection_adapters/mysql2_adapter.rb:3:in
' /var/lib/gems/2.1.0/gems/activesupport-4.2.3/lib/active_support/dependencies.rb:274:in require' /var/lib/gems/2.1.0/gems/activesupport-4.2.3/lib/active_support/dependencies.rb:274:in
block in require' /var/lib/gems/2.1.0/gems/activesupport-4.2.3/lib/active_support/dependencies.rb:240:in load_dependency' /var/lib/gems/2.1.0/gems/activesupport-4.2.3/lib/active_support/dependencies.rb:274:in
require' /var/lib/gems/2.1.0/gems/activerecord-4.2.3/lib/active_record/connection_adapters/connection_specification.rb:175:in spec' /var/lib/gems/2.1.0/gems/activerecord-4.2.3/lib/active_record/connection_handling.rb:50:in
establish_connection' /var/lib/gems/2.1.0/gems/activerecord-4.2.3/lib/active_record/railtie.rb:120:in block (2 levels) in <class:Railtie>' /var/lib/gems/2.1.0/gems/activesupport-4.2.3/lib/active_support/lazy_load_hooks.rb:38:in
instance_eval' /var/lib/gems/2.1.0/gems/activesupport-4.2.3/lib/active_support/lazy_load_hooks.rb:38:in execute_hook' /var/lib/gems/2.1.0/gems/activesupport-4.2.3/lib/active_support/lazy_load_hooks.rb:45:in
block in run_load_hooks' /var/lib/gems/2.1.0/gems/activesupport-4.2.3/lib/active_support/lazy_load_hooks.rb:44:in each' /var/lib/gems/2.1.0/gems/activesupport-4.2.3/lib/active_support/lazy_load_hooks.rb:44:in
run_load_hooks' /var/lib/gems/2.1.0/gems/activerecord-4.2.3/lib/active_record/base.rb:315:in <module:ActiveRecord>' /var/lib/gems/2.1.0/gems/activerecord-4.2.3/lib/active_record/base.rb:26:in
' /var/lib/gems/2.1.0/gems/apartment-1.0.2/lib/apartment.rb:56:in connection_class' /var/lib/gems/2.1.0/gems/apartment-1.0.2/lib/apartment/tenant.rb:64:in
config' /var/lib/gems/2.1.0/gems/apartment-1.0.2/lib/apartment/tenant.rb:28:in adapter' /var/lib/gems/2.1.0/gems/apartment-1.0.2/lib/apartment/tenant.rb:19:in
init' /var/lib/gems/2.1.0/gems/apartment-1.0.2/lib/apartment/railtie.rb:31:in block in <class:Railtie>' /var/lib/gems/2.1.0/gems/activesupport-4.2.3/lib/active_support/callbacks.rb:444:in
instance_exec' /var/lib/gems/2.1.0/gems/activesupport-4.2.3/lib/active_support/callbacks.rb:444:in block in make_lambda' /var/lib/gems/2.1.0/gems/activesupport-4.2.3/lib/active_support/callbacks.rb:190:in
call' /var/lib/gems/2.1.0/gems/activesupport-4.2.3/lib/active_support/callbacks.rb:190:in block in simple' /var/lib/gems/2.1.0/gems/activesupport-4.2.3/lib/active_support/callbacks.rb:502:in
call' /var/lib/gems/2.1.0/gems/activesupport-4.2.3/lib/active_support/callbacks.rb:502:in block in call' /var/lib/gems/2.1.0/gems/activesupport-4.2.3/lib/active_support/callbacks.rb:502:in
each' /var/lib/gems/2.1.0/gems/activesupport-4.2.3/lib/active_support/callbacks.rb:502:in call' /var/lib/gems/2.1.0/gems/activesupport-4.2.3/lib/active_support/callbacks.rb:88:in
run_callbacks' /var/lib/gems/2.1.0/gems/actionpack-4.2.3/lib/action_dispatch/middleware/reloader.rb:83:in prepare!' /var/lib/gems/2.1.0/gems/actionpack-4.2.3/lib/action_dispatch/middleware/reloader.rb:55:in
prepare!' /var/lib/gems/2.1.0/gems/railties-4.2.3/lib/rails/application/finisher.rb:50:in block in <module:Finisher>' /var/lib/gems/2.1.0/gems/railties-4.2.3/lib/rails/initializable.rb:30:in
instance_exec' /var/lib/gems/2.1.0/gems/railties-4.2.3/lib/rails/initializable.rb:30:in run' /var/lib/gems/2.1.0/gems/railties-4.2.3/lib/rails/initializable.rb:55:in
block in run_initializers' /var/lib/gems/2.1.0/gems/railties-4.2.3/lib/rails/initializable.rb:54:in run_initializers' /var/lib/gems/2.1.0/gems/railties-4.2.3/lib/rails/application.rb:352:in
initialize!' /home/luca/cmonrails/cmonrails/config/environment.rb:5:in <top (required)>' /var/lib/gems/2.1.0/gems/railties-4.2.3/lib/rails/application.rb:328:in
require' /var/lib/gems/2.1.0/gems/railties-4.2.3/lib/rails/application.rb:328:in require_environment!' /var/lib/gems/2.1.0/gems/railties-4.2.3/lib/rails/application.rb:457:in
block in run_tasks_blocks' Tasks: TOP => db:migrate => environment (See full trace by running task with --trace) luca@luca-X200MA:~/cmonrails/cmonrails$ rake db:migrate rake aborted! Gem::LoadError: Specified 'mysql2' for database adapter, but the gem is not loaded. Add gem 'mysql2'
to your Gemfile (and ensure its version is at the minimum required by ActiveRecord). /var/lib/gems/2.1.0/gems/activerecord-4.2.3/lib/active_record/connection_adapters/connection_specification.rb:177:in rescue in spec' /var/lib/gems/2.1.0/gems/activerecord-4.2.3/lib/active_record/connection_adapters/connection_specification.rb:174:in
spec' /var/lib/gems/2.1.0/gems/activerecord-4.2.3/lib/active_record/connection_handling.rb:50:in establish_connection' /var/lib/gems/2.1.0/gems/activerecord-4.2.3/lib/active_record/railtie.rb:120:in
block (2 levels) in ' /var/lib/gems/2.1.0/gems/activesupport-4.2.3/lib/active_support/lazy_load_hooks.rb:38:in instance_eval' /var/lib/gems/2.1.0/gems/activesupport-4.2.3/lib/active_support/lazy_load_hooks.rb:38:in
execute_hook' /var/lib/gems/2.1.0/gems/activesupport-4.2.3/lib/active_support/lazy_load_hooks.rb:45:in block in run_load_hooks' /var/lib/gems/2.1.0/gems/activesupport-4.2.3/lib/active_support/lazy_load_hooks.rb:44:in
each' /var/lib/gems/2.1.0/gems/activesupport-4.2.3/lib/active_support/lazy_load_hooks.rb:44:in run_load_hooks' /var/lib/gems/2.1.0/gems/activerecord-4.2.3/lib/active_record/base.rb:315:in
' /var/lib/gems/2.1.0/gems/activerecord-4.2.3/lib/active_record/base.rb:26:in <top (required)>' /var/lib/gems/2.1.0/gems/apartment-1.0.2/lib/apartment.rb:56:in
connection_class' /var/lib/gems/2.1.0/gems/apartment-1.0.2/lib/apartment/tenant.rb:64:in config' /var/lib/gems/2.1.0/gems/apartment-1.0.2/lib/apartment/tenant.rb:28:in
adapter' /var/lib/gems/2.1.0/gems/apartment-1.0.2/lib/apartment/tenant.rb:19:in init' /var/lib/gems/2.1.0/gems/apartment-1.0.2/lib/apartment/railtie.rb:31:in
block in ' /var/lib/gems/2.1.0/gems/activesupport-4.2.3/lib/active_support/callbacks.rb:444:in instance_exec' /var/lib/gems/2.1.0/gems/activesupport-4.2.3/lib/active_support/callbacks.rb:444:in
block in make_lambda' /var/lib/gems/2.1.0/gems/activesupport-4.2.3/lib/active_support/callbacks.rb:190:in call' /var/lib/gems/2.1.0/gems/activesupport-4.2.3/lib/active_support/callbacks.rb:190:in
block in simple' /var/lib/gems/2.1.0/gems/activesupport-4.2.3/lib/active_support/callbacks.rb:502:in call' /var/lib/gems/2.1.0/gems/activesupport-4.2.3/lib/active_support/callbacks.rb:502:in
block in call' /var/lib/gems/2.1.0/gems/activesupport-4.2.3/lib/active_support/callbacks.rb:502:in each' /var/lib/gems/2.1.0/gems/activesupport-4.2.3/lib/active_support/callbacks.rb:502:in
call' /var/lib/gems/2.1.0/gems/activesupport-4.2.3/lib/active_support/callbacks.rb:88:in run_callbacks' /var/lib/gems/2.1.0/gems/actionpack-4.2.3/lib/action_dispatch/middleware/reloader.rb:83:in
prepare!' /var/lib/gems/2.1.0/gems/actionpack-4.2.3/lib/action_dispatch/middleware/reloader.rb:55:in prepare!' /var/lib/gems/2.1.0/gems/railties-4.2.3/lib/rails/application/finisher.rb:50:in
block in ' /var/lib/gems/2.1.0/gems/railties-4.2.3/lib/rails/initializable.rb:30:in instance_exec' /var/lib/gems/2.1.0/gems/railties-4.2.3/lib/rails/initializable.rb:30:in
run' /var/lib/gems/2.1.0/gems/railties-4.2.3/lib/rails/initializable.rb:55:in block in run_initializers' /var/lib/gems/2.1.0/gems/railties-4.2.3/lib/rails/initializable.rb:54:in
run_initializers' /var/lib/gems/2.1.0/gems/railties-4.2.3/lib/rails/application.rb:352:in initialize!' /home/luca/cmonrails/cmonrails/config/environment.rb:5:in
' /var/lib/gems/2.1.0/gems/railties-4.2.3/lib/rails/application.rb:328:in require' /var/lib/gems/2.1.0/gems/railties-4.2.3/lib/rails/application.rb:328:in
require_environment!' /var/lib/gems/2.1.0/gems/railties-4.2.3/lib/rails/application.rb:457:in block in run_tasks_blocks' Gem::LoadError: can't activate mysql2 (~> 0.3.13), already activated mysql2-0.4.2. Make sure all dependencies are added to Gemfile. /var/lib/gems/2.1.0/gems/activerecord-4.2.3/lib/active_record/connection_adapters/mysql2_adapter.rb:3:in
' /var/lib/gems/2.1.0/gems/activesupport-4.2.3/lib/active_support/dependencies.rb:274:in require' /var/lib/gems/2.1.0/gems/activesupport-4.2.3/lib/active_support/dependencies.rb:274:in
block in require' /var/lib/gems/2.1.0/gems/activesupport-4.2.3/lib/active_support/dependencies.rb:240:in load_dependency' /var/lib/gems/2.1.0/gems/activesupport-4.2.3/lib/active_support/dependencies.rb:274:in
require' /var/lib/gems/2.1.0/gems/activerecord-4.2.3/lib/active_record/connection_adapters/connection_specification.rb:175:in spec' /var/lib/gems/2.1.0/gems/activerecord-4.2.3/lib/active_record/connection_handling.rb:50:in
establish_connection' /var/lib/gems/2.1.0/gems/activerecord-4.2.3/lib/active_record/railtie.rb:120:in block (2 levels) in <class:Railtie>' /var/lib/gems/2.1.0/gems/activesupport-4.2.3/lib/active_support/lazy_load_hooks.rb:38:in
instance_eval' /var/lib/gems/2.1.0/gems/activesupport-4.2.3/lib/active_support/lazy_load_hooks.rb:38:in execute_hook' /var/lib/gems/2.1.0/gems/activesupport-4.2.3/lib/active_support/lazy_load_hooks.rb:45:in
block in run_load_hooks' /var/lib/gems/2.1.0/gems/activesupport-4.2.3/lib/active_support/lazy_load_hooks.rb:44:in each' /var/lib/gems/2.1.0/gems/activesupport-4.2.3/lib/active_support/lazy_load_hooks.rb:44:in
run_load_hooks' /var/lib/gems/2.1.0/gems/activerecord-4.2.3/lib/active_record/base.rb:315:in <module:ActiveRecord>' /var/lib/gems/2.1.0/gems/activerecord-4.2.3/lib/active_record/base.rb:26:in
' /var/lib/gems/2.1.0/gems/apartment-1.0.2/lib/apartment.rb:56:in connection_class' /var/lib/gems/2.1.0/gems/apartment-1.0.2/lib/apartment/tenant.rb:64:in
config' /var/lib/gems/2.1.0/gems/apartment-1.0.2/lib/apartment/tenant.rb:28:in adapter' /var/lib/gems/2.1.0/gems/apartment-1.0.2/lib/apartment/tenant.rb:19:in
init' /var/lib/gems/2.1.0/gems/apartment-1.0.2/lib/apartment/railtie.rb:31:in block in <class:Railtie>' /var/lib/gems/2.1.0/gems/activesupport-4.2.3/lib/active_support/callbacks.rb:444:in
instance_exec' /var/lib/gems/2.1.0/gems/activesupport-4.2.3/lib/active_support/callbacks.rb:444:in block in make_lambda' /var/lib/gems/2.1.0/gems/activesupport-4.2.3/lib/active_support/callbacks.rb:190:in
call' /var/lib/gems/2.1.0/gems/activesupport-4.2.3/lib/active_support/callbacks.rb:190:in block in simple' /var/lib/gems/2.1.0/gems/activesupport-4.2.3/lib/active_support/callbacks.rb:502:in
call' /var/lib/gems/2.1.0/gems/activesupport-4.2.3/lib/active_support/callbacks.rb:502:in block in call' /var/lib/gems/2.1.0/gems/activesupport-4.2.3/lib/active_support/callbacks.rb:502:in
each' /var/lib/gems/2.1.0/gems/activesupport-4.2.3/lib/active_support/callbacks.rb:502:in call' /var/lib/gems/2.1.0/gems/activesupport-4.2.3/lib/active_support/callbacks.rb:88:in
run_callbacks' /var/lib/gems/2.1.0/gems/actionpack-4.2.3/lib/action_dispatch/middleware/reloader.rb:83:in prepare!' /var/lib/gems/2.1.0/gems/actionpack-4.2.3/lib/action_dispatch/middleware/reloader.rb:55:in
prepare!' /var/lib/gems/2.1.0/gems/railties-4.2.3/lib/rails/application/finisher.rb:50:in block in <module:Finisher>' /var/lib/gems/2.1.0/gems/railties-4.2.3/lib/rails/initializable.rb:30:in
instance_exec' /var/lib/gems/2.1.0/gems/railties-4.2.3/lib/rails/initializable.rb:30:in run' /var/lib/gems/2.1.0/gems/railties-4.2.3/lib/rails/initializable.rb:55:in
block in run_initializers' /var/lib/gems/2.1.0/gems/railties-4.2.3/lib/rails/initializable.rb:54:in run_initializers' /var/lib/gems/2.1.0/gems/railties-4.2.3/lib/rails/application.rb:352:in
initialize!' /home/luca/cmonrails/cmonrails/config/environment.rb:5:in <top (required)>' /var/lib/gems/2.1.0/gems/railties-4.2.3/lib/rails/application.rb:328:in
require' /var/lib/gems/2.1.0/gems/railties-4.2.3/lib/rails/application.rb:328:in require_environment!' /var/lib/gems/2.1.0/gems/railties-4.2.3/lib/rails/application.rb:457:in
block in run_tasks_blocks' Tasks: TOP => db:migrate => environment (See full trace by running task with --trace)
Aucun commentaire:
Enregistrer un commentaire