Can't migrate from 1.1.2 to 2.0.3
Added by Philipp Ringli about 12 years ago
Hi!
I followed this guide to upgrade a 1.4 installation:
http://www.redmine.org/projects/redmine/wiki/RedmineUpgrade
I am stuck at step 4:
bash-3.2# rake db:migrate RAILS_ENV=production
rake aborted!
Please install the mysql2 adapter: `gem install activerecord-mysql2-adapter` (mysql2 is not part of the bundle. Add it to Gemfile.)
I installed the activerecord-mysql2-adapter but, I still get the same message when trying to migrate.
Thanks for any help!
Philipp
Replies (4)
RE: Can't migrate from 1.4 to 2.0.3
-
Added by Philipp Ringli about 12 years ago
Correction: I was on redmine v1.1.2
RE: Can't migrate from 1.1.2 to 2.0.3
-
Added by Philipp Ringli about 12 years ago
RAILS_ENV=production script/about /usr/local/lib/ruby/gems/1.8/gems/bundler-1.0.12/lib/bundler/shared_helpers.rb:107:in `gem': Please install the mysql2 adapter: `gem install activerecord-mysql2-adapter` (mysql2 is not part of the bundle. Add it to Gemfile.) (LoadError) from /usr/local/lib/ruby/gems/1.8/gems/activerecord-3.2.6/lib/active_record/connection_adapters/mysql2_adapter.rb:3 from /usr/local/lib/ruby/gems/1.8/gems/activesupport-3.2.6/lib/active_support/dependencies.rb:251:in `require' from /usr/local/lib/ruby/gems/1.8/gems/activesupport-3.2.6/lib/active_support/dependencies.rb:251:in `require' from /usr/local/lib/ruby/gems/1.8/gems/activesupport-3.2.6/lib/active_support/dependencies.rb:236:in `load_dependency' from /usr/local/lib/ruby/gems/1.8/gems/activesupport-3.2.6/lib/active_support/dependencies.rb:251:in `require' from /usr/local/lib/ruby/gems/1.8/gems/activerecord-3.2.6/lib/active_record/connection_adapters/abstract/connection_specification.rb:48:in `resolve_hash_connection' from /usr/local/lib/ruby/gems/1.8/gems/activerecord-3.2.6/lib/active_record/connection_adapters/abstract/connection_specification.rb:39:in `resolve_string_connection' from /usr/local/lib/ruby/gems/1.8/gems/activerecord-3.2.6/lib/active_record/connection_adapters/abstract/connection_specification.rb:23:in `spec' from /usr/local/lib/ruby/gems/1.8/gems/activerecord-3.2.6/lib/active_record/connection_adapters/abstract/connection_specification.rb:127:in `establish_connection' from /usr/local/lib/ruby/gems/1.8/gems/activerecord-3.2.6/lib/active_record/railtie.rb:82 from /usr/local/lib/ruby/gems/1.8/gems/activesupport-3.2.6/lib/active_support/lazy_load_hooks.rb:36:in `instance_eval' from /usr/local/lib/ruby/gems/1.8/gems/activesupport-3.2.6/lib/active_support/lazy_load_hooks.rb:36:in `execute_hook' from /usr/local/lib/ruby/gems/1.8/gems/activesupport-3.2.6/lib/active_support/lazy_load_hooks.rb:43:in `run_load_hooks' from /usr/local/lib/ruby/gems/1.8/gems/activesupport-3.2.6/lib/active_support/lazy_load_hooks.rb:42:in `each' from /usr/local/lib/ruby/gems/1.8/gems/activesupport-3.2.6/lib/active_support/lazy_load_hooks.rb:42:in `run_load_hooks' from /usr/local/lib/ruby/gems/1.8/gems/activerecord-3.2.6/lib/active_record/base.rb:721 from /Users/cmyk/Sites/redmine/lib/plugins/acts_as_activity_provider/init.rb:2 from /Users/cmyk/Sites/redmine/config/initializers/00-core_plugins.rb:12 from /Users/cmyk/Sites/redmine/config/initializers/00-core_plugins.rb:2:in `each' from /Users/cmyk/Sites/redmine/config/initializers/00-core_plugins.rb:2 from /usr/local/lib/ruby/gems/1.8/gems/activesupport-3.2.6/lib/active_support/dependencies.rb:245:in `load' from /usr/local/lib/ruby/gems/1.8/gems/activesupport-3.2.6/lib/active_support/dependencies.rb:245:in `load' from /usr/local/lib/ruby/gems/1.8/gems/activesupport-3.2.6/lib/active_support/dependencies.rb:236:in `load_dependency' from /usr/local/lib/ruby/gems/1.8/gems/activesupport-3.2.6/lib/active_support/dependencies.rb:245:in `load' from /usr/local/lib/ruby/gems/1.8/gems/railties-3.2.6/lib/rails/engine.rb:588 from /usr/local/lib/ruby/gems/1.8/gems/railties-3.2.6/lib/rails/engine.rb:587:in `each' from /usr/local/lib/ruby/gems/1.8/gems/railties-3.2.6/lib/rails/engine.rb:587 from /usr/local/lib/ruby/gems/1.8/gems/railties-3.2.6/lib/rails/initializable.rb:30:in `instance_exec' from /usr/local/lib/ruby/gems/1.8/gems/railties-3.2.6/lib/rails/initializable.rb:30:in `run' from /usr/local/lib/ruby/gems/1.8/gems/railties-3.2.6/lib/rails/initializable.rb:55:in `run_initializers' from /usr/local/lib/ruby/gems/1.8/gems/railties-3.2.6/lib/rails/initializable.rb:54:in `each' from /usr/local/lib/ruby/gems/1.8/gems/railties-3.2.6/lib/rails/initializable.rb:54:in `run_initializers' from /usr/local/lib/ruby/gems/1.8/gems/railties-3.2.6/lib/rails/application.rb:136:in `initialize!' from /usr/local/lib/ruby/gems/1.8/gems/railties-3.2.6/lib/rails/railtie/configurable.rb:30:in `send' from /usr/local/lib/ruby/gems/1.8/gems/railties-3.2.6/lib/rails/railtie/configurable.rb:30:in `method_missing' from /Users/cmyk/Sites/redmine/config/environment.rb:14 from script/about:4:in `require' from script/about:4
RE: Can't migrate from 1.1.2 to 2.0.3
-
Added by Philipp Ringli about 12 years ago
I did some research before posting here. And I am not exactly a rails guru.
wsPhil:redmine cmyk$ irb irb(main):001:0> require 'rubygems' => true irb(main):002:0> require 'mysql2' => true irb(main):003:0> c = Mysql2::Client.new Mysql2::Error: Access denied for user 'cmyk'@'localhost' (using password: NO) from /usr/local/lib/ruby/gems/1.8/gems/mysql2-0.3.11/lib/mysql2/client.rb:44:in `connect' from /usr/local/lib/ruby/gems/1.8/gems/mysql2-0.3.11/lib/mysql2/client.rb:44:in `initialize' from (irb):3:in `new' from (irb):3
RE: Can't migrate from 1.1.2 to 2.0.3
-
Added by Philipp Ringli about 12 years ago
I changed the adapter to mysql. It worked with the migration and it's running.
I have ruby 1.8.7, I guess that was the problem with mysql2, since that need 1.9.x.