У меня есть приложение Ruby-on-Rails
(3.2.2) с mysql2 (0.5.1)
и MyQSL Server
mysql --version
mysql --version
Вер. 8.0.11 для osx10.13 на x86_64 (Homebrew).
Когда я делаю bundle exec rake db:setup
, создается БД.
При попытке bundle exec rake db:migrate
происходит сбой:
bundle exec rake db:migrate --trace
** Invoke db:migrate (first_time)
** Invoke environment (first_time)
** Execute environment
** Invoke db:load_config (first_time)
** Execute db:load_config
** Execute db:migrate
rake aborted!
NoMethodError: undefined method `accept' for nil:NilClass
/Users/janjezek/.rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/gems/activerecord-3.2.22/lib/active_record/connection_adapters/abstract/database_statements.rb:7:in `to_sql'
/Users/janjezek/.rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/gems/activerecord-3.2.22/lib/active_record/connection_adapters/abstract/database_statements.rb:38:in `select_values'
/Users/janjezek/.rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/gems/activerecord-3.2.22/lib/active_record/migration.rb:587:in `get_all_versions'
/Users/janjezek/.rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/gems/activerecord-3.2.22/lib/active_record/migration.rb:745:in `migrated'
/Users/janjezek/.rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/gems/activerecord-3.2.22/lib/active_record/migration.rb:668:in `current_version'
/Users/janjezek/.rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/gems/activerecord-3.2.22/lib/active_record/migration.rb:685:in `block in migrate'
/Users/janjezek/.rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/gems/activerecord-3.2.22/lib/active_record/migration.rb:685:in `each'
/Users/janjezek/.rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/gems/activerecord-3.2.22/lib/active_record/migration.rb:685:in `detect'
/Users/janjezek/.rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/gems/activerecord-3.2.22/lib/active_record/migration.rb:685:in `migrate'
/Users/janjezek/.rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/gems/activerecord-3.2.22/lib/active_record/migration.rb:570:in `up'
/Users/janjezek/.rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/gems/activerecord-3.2.22/lib/active_record/migration.rb:551:in `migrate'
/Users/janjezek/.rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/gems/activerecord-3.2.22/lib/active_record/railties/databases.rake:193:in `block (2 levels) in <top (required)>'
/Users/janjezek/.rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/gems/rake-10.5.0/lib/rake/task.rb:240:in `block in execute'
/Users/janjezek/.rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/gems/rake-10.5.0/lib/rake/task.rb:235:in `each'
/Users/janjezek/.rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/gems/rake-10.5.0/lib/rake/task.rb:235:in `execute'
/Users/janjezek/.rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/gems/rake-10.5.0/lib/rake/task.rb:179:in `block in invoke_with_call_chain'
/Users/janjezek/.rbenv/versions/2.3.3/lib/ruby/2.3.0/monitor.rb:214:in `mon_synchronize'
/Users/janjezek/.rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/gems/rake-10.5.0/lib/rake/task.rb:172:in `invoke_with_call_chain'
/Users/janjezek/.rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/gems/rake-10.5.0/lib/rake/task.rb:165:in `invoke'
/Users/janjezek/.rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/gems/rake-10.5.0/lib/rake/application.rb:150:in `invoke_task'
/Users/janjezek/.rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/gems/rake-10.5.0/lib/rake/application.rb:106:in `block (2 levels) in top_level'
/Users/janjezek/.rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/gems/rake-10.5.0/lib/rake/application.rb:106:in `each'
/Users/janjezek/.rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/gems/rake-10.5.0/lib/rake/application.rb:106:in `block in top_level'
/Users/janjezek/.rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/gems/rake-10.5.0/lib/rake/application.rb:115:in `run_with_threads'
/Users/janjezek/.rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/gems/rake-10.5.0/lib/rake/application.rb:100:in `top_level'
/Users/janjezek/.rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/gems/rake-10.5.0/lib/rake/application.rb:78:in `block in run'
/Users/janjezek/.rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/gems/rake-10.5.0/lib/rake/application.rb:176:in `standard_exception_handling'
/Users/janjezek/.rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/gems/rake-10.5.0/lib/rake/application.rb:75:in `run'
/Users/janjezek/.rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/gems/rake-10.5.0/bin/rake:33:in `<top (required)>'
/Users/janjezek/.rbenv/versions/2.3.3/bin/rake:22:in `load'
/Users/janjezek/.rbenv/versions/2.3.3/bin/rake:22:in `<top (required)>'
/Users/janjezek/.rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/gems/bundler-1.16.2/lib/bundler/cli/exec.rb:74:in `load'
/Users/janjezek/.rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/gems/bundler-1.16.2/lib/bundler/cli/exec.rb:74:in `kernel_load'
/Users/janjezek/.rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/gems/bundler-1.16.2/lib/bundler/cli/exec.rb:28:in `run'
/Users/janjezek/.rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/gems/bundler-1.16.2/lib/bundler/cli.rb:424:in `exec'
/Users/janjezek/.rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/gems/bundler-1.16.2/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
/Users/janjezek/.rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/gems/bundler-1.16.2/lib/bundler/vendor/thor/lib/thor/invocation.rb:126:in `invoke_command'
/Users/janjezek/.rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/gems/bundler-1.16.2/lib/bundler/vendor/thor/lib/thor.rb:387:in `dispatch'
/Users/janjezek/.rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/gems/bundler-1.16.2/lib/bundler/cli.rb:27:in `dispatch'
/Users/janjezek/.rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/gems/bundler-1.16.2/lib/bundler/vendor/thor/lib/thor/base.rb:466:in `start'
/Users/janjezek/.rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/gems/bundler-1.16.2/lib/bundler/cli.rb:18:in `start'
/Users/janjezek/.rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/gems/bundler-1.16.2/exe/bundle:30:in `block in <top (required)>'
/Users/janjezek/.rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/gems/bundler-1.16.2/lib/bundler/friendly_errors.rb:124:in `with_friendly_errors'
/Users/janjezek/.rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/gems/bundler-1.16.2/exe/bundle:22:in `<top (required)>'
/Users/janjezek/.rbenv/versions/2.3.3/bin/bundle:22:in `load'
/Users/janjezek/.rbenv/versions/2.3.3/bin/bundle:22:in `<main>'
Tasks: TOP => db:migrate
Я не нашел никакого решения для этого.
Мне пришлось установить gem "activerecord-mysql2-adapter"
, чтобы запустить его.
Без этого драгоценного камня это бросает это:
LoadError: Please install the mysql2 adapter: `gem install activerecord-mysql2-adapter` (can't activate mysql2 (~> 0.3.10), already activated mysql2-0.5.1. Make sure all dependencies are added to Gemfile.)
Когда я запускаю свой старый (оригинальная версия mysql2 0.3.2.1), это происходит:
(Я сделал обновление из-за этой ошибки)
gem install mysql2 -v '0.3.21' --source 'https://rubygems.org/' 5 ↵ 2.3.3 RSpec: 128.09%
Building native extensions. This could take a while...
ERROR: Error installing mysql2:
ERROR: Failed to build gem native extension.
current directory: /Users/janjezek/.rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/gems/mysql2-0.3.21/ext/mysql2
/Users/janjezek/.rbenv/versions/2.3.3/bin/ruby -r ./siteconf20180629-41801-6cf56s.rb extconf.rb
checking for ruby/thread.h... yes
checking for rb_thread_call_without_gvl() in ruby/thread.h... yes
checking for rb_thread_blocking_region()... no
checking for rb_wait_for_single_fd()... yes
checking for rb_hash_dup()... yes
checking for rb_intern3()... yes
-----
Using mysql_config at /usr/local/bin/mysql_config
-----
checking for mysql.h... yes
checking for errmsg.h... yes
checking for mysqld_error.h... yes
-----
Setting rpath to /usr/local/Cellar/mysql/8.0.11/lib
-----
creating Makefile
To see why this extension failed to compile, please check the mkmf.log which can be found here:
/Users/janjezek/.rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/extensions/x86_64-darwin-17/2.3.0-static/mysql2-0.3.21/mkmf.log
current directory: /Users/janjezek/.rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/gems/mysql2-0.3.21/ext/mysql2
make "DESTDIR=" clean
current directory: /Users/janjezek/.rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/gems/mysql2-0.3.21/ext/mysql2
make "DESTDIR="
compiling infile.c
compiling client.c
client.c:439:3: error: use of undeclared identifier 'my_bool'
my_bool res = mysql_read_query_result(client);
^
client.c:441:19: error: use of undeclared identifier 'res'
return (void *)(res == 0 ? Qtrue : Qfalse);
^
client.c:762:3: error: use of undeclared identifier 'my_bool'
my_bool boolval;
^
client.c:793:7: error: use of undeclared identifier 'boolval'
boolval = (value == Qfalse ? 0 : 1);
^
client.c:794:17: error: use of undeclared identifier 'boolval'
retval = &boolval;
^
client.c:797:10: error: use of undeclared identifier 'MYSQL_SECURE_AUTH'; did you mean 'MYSQL_DEFAULT_AUTH'?
case MYSQL_SECURE_AUTH:
^~~~~~~~~~~~~~~~~
MYSQL_DEFAULT_AUTH
/usr/local/Cellar/mysql/8.0.11/include/mysql/mysql.h:188:3: note: 'MYSQL_DEFAULT_AUTH' declared here
MYSQL_DEFAULT_AUTH,
^
client.c:798:7: error: use of undeclared identifier 'boolval'
boolval = (value == Qfalse ? 0 : 1);
^
client.c:799:17: error: use of undeclared identifier 'boolval'
retval = &boolval;
^
client.c:830:38: error: use of undeclared identifier 'boolval'
wrapper->reconnect_enabled = boolval;
^
client.c:1185:38: error: use of undeclared identifier 'MYSQL_SECURE_AUTH'; did you mean 'MYSQL_DEFAULT_AUTH'?
return _mysql_client_options(self, MYSQL_SECURE_AUTH, value);
^~~~~~~~~~~~~~~~~
MYSQL_DEFAULT_AUTH
/usr/local/Cellar/mysql/8.0.11/include/mysql/mysql.h:188:3: note: 'MYSQL_DEFAULT_AUTH' declared here
MYSQL_DEFAULT_AUTH,
^
10 errors generated.
make: *** [client.o] Error 1
make failed, exit code 2
Gem files will remain installed in /Users/janjezek/.rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/gems/mysql2-0.3.21 for inspection.
Results logged to /Users/janjezek/.rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/extensions/x86_64-darwin-17/2.3.0-static/mysql2-0.3.21/gem_make.out
(кстати: я могу подключиться к mysql -u root -p
, и созданные там базы данных есть.)
Есть еще предложения?
для завершения:
database.yml
development:
adapter: mysql2
host: 127.0.0.1
port: 3306
database: mydb_development
username: root
password: root
EDIT:
БЕЗ драгоценного камня mysqladapter:
rake aborted!
LoadError: Please install the mysql2 adapter: `gem install activerecord-mysql2-adapter` (can't activate mysql2 (~> 0.3.10), already activated mysql2-0.4.10. Make sure all dependencies are added to Gemfile.)
/Users/janjezek/.rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/gems/bundler-1.16.2/lib/bundler/rubygems_integration.rb:408:in `block (2 levels) in replace_gem'
/Users/janjezek/.rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/gems/activerecord-3.2.22/lib/active_record/connection_adapters/mysql2_adapter.rb:3:in `<top (required)>'
/Users/janjezek/.rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/gems/activesupport-3.2.22/lib/active_support/dependencies.rb:251:in `require'
/Users/janjezek/.rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/gems/activesupport-3.2.22/lib/active_support/dependencies.rb:251:in `block in require'
/Users/janjezek/.rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/gems/activesupport-3.2.22/lib/active_support/dependencies.rb:236:in `load_dependency'
/Users/janjezek/.rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/gems/activesupport-3.2.22/lib/active_support/dependencies.rb:251:in `require'
/Users/janjezek/.rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/gems/activerecord-3.2.22/lib/active_record/connection_adapters/abstract/connection_specification.rb:50:in `resolve_hash_connection'
/Users/janjezek/.rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/gems/activerecord-3.2.22/lib/active_record/connection_adapters/abstract/connection_specification.rb:29:in `spec'
/Users/janjezek/.rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/gems/activerecord-3.2.22/lib/active_record/connection_adapters/abstract/connection_specification.rb:130:in `establish_connection'
/Users/janjezek/.rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/gems/activerecord-3.2.22/lib/active_record/railties/databases.rake:101:in `create_database'
/Users/janjezek/.rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/gems/activerecord-3.2.22/lib/active_record/railties/databases.rake:62:in `block (3 levels) in <top (required)>'
/Users/janjezek/.rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/gems/activerecord-3.2.22/lib/active_record/railties/databases.rake:62:in `each'
/Users/janjezek/.rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/gems/activerecord-3.2.22/lib/active_record/railties/databases.rake:62:in `block (2 levels) in <top (required)>'
/Users/janjezek/.rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/gems/rake-10.5.0/lib/rake/task.rb:240:in `block in execute'
/Users/janjezek/.rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/gems/rake-10.5.0/lib/rake/task.rb:235:in `each'
/Users/janjezek/.rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/gems/rake-10.5.0/lib/rake/task.rb:235:in `execute'
/Users/janjezek/.rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/gems/rake-10.5.0/lib/rake/task.rb:179:in `block in invoke_with_call_chain'
/Users/janjezek/.rbenv/versions/2.3.3/lib/ruby/2.3.0/monitor.rb:214:in `mon_synchronize'
/Users/janjezek/.rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/gems/rake-10.5.0/lib/rake/task.rb:172:in `invoke_with_call_chain'
/Users/janjezek/.rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/gems/rake-10.5.0/lib/rake/task.rb:201:in `block in invoke_prerequisites'
/Users/janjezek/.rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/gems/rake-10.5.0/lib/rake/task.rb:199:in `each'
/Users/janjezek/.rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/gems/rake-10.5.0/lib/rake/task.rb:199:in `invoke_prerequisites'
/Users/janjezek/.rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/gems/rake-10.5.0/lib/rake/task.rb:178:in `block in invoke_with_call_chain'
/Users/janjezek/.rbenv/versions/2.3.3/lib/ruby/2.3.0/monitor.rb:214:in `mon_synchronize'
/Users/janjezek/.rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/gems/rake-10.5.0/lib/rake/task.rb:172:in `invoke_with_call_chain'
/Users/janjezek/.rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/gems/rake-10.5.0/lib/rake/task.rb:201:in `block in invoke_prerequisites'
/Users/janjezek/.rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/gems/rake-10.5.0/lib/rake/task.rb:199:in `each'
/Users/janjezek/.rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/gems/rake-10.5.0/lib/rake/task.rb:199:in `invoke_prerequisites'
/Users/janjezek/.rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/gems/rake-10.5.0/lib/rake/task.rb:178:in `block in invoke_with_call_chain'
/Users/janjezek/.rbenv/versions/2.3.3/lib/ruby/2.3.0/monitor.rb:214:in `mon_synchronize'
/Users/janjezek/.rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/gems/rake-10.5.0/lib/rake/task.rb:172:in `invoke_with_call_chain'
/Users/janjezek/.rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/gems/rake-10.5.0/lib/rake/task.rb:165:in `invoke'
/Users/janjezek/.rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/gems/rake-10.5.0/lib/rake/application.rb:150:in `invoke_task'
/Users/janjezek/.rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/gems/rake-10.5.0/lib/rake/application.rb:106:in `block (2 levels) in top_level'
/Users/janjezek/.rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/gems/rake-10.5.0/lib/rake/application.rb:106:in `each'
/Users/janjezek/.rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/gems/rake-10.5.0/lib/rake/application.rb:106:in `block in top_level'
/Users/janjezek/.rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/gems/rake-10.5.0/lib/rake/application.rb:115:in `run_with_threads'
/Users/janjezek/.rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/gems/rake-10.5.0/lib/rake/application.rb:100:in `top_level'
/Users/janjezek/.rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/gems/rake-10.5.0/lib/rake/application.rb:78:in `block in run'
/Users/janjezek/.rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/gems/rake-10.5.0/lib/rake/application.rb:176:in `standard_exception_handling'
/Users/janjezek/.rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/gems/rake-10.5.0/lib/rake/application.rb:75:in `run'
/Users/janjezek/.rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/gems/rake-10.5.0/bin/rake:33:in `<top (required)>'
/Users/janjezek/.rbenv/versions/2.3.3/bin/rake:22:in `load'
/Users/janjezek/.rbenv/versions/2.3.3/bin/rake:22:in `<top (required)>'
/Users/janjezek/.rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/gems/bundler-1.16.2/lib/bundler/cli/exec.rb:74:in `load'
/Users/janjezek/.rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/gems/bundler-1.16.2/lib/bundler/cli/exec.rb:74:in `kernel_load'
/Users/janjezek/.rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/gems/bundler-1.16.2/lib/bundler/cli/exec.rb:28:in `run'
/Users/janjezek/.rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/gems/bundler-1.16.2/lib/bundler/cli.rb:424:in `exec'
/Users/janjezek/.rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/gems/bundler-1.16.2/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
/Users/janjezek/.rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/gems/bundler-1.16.2/lib/bundler/vendor/thor/lib/thor/invocation.rb:126:in `invoke_command'
/Users/janjezek/.rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/gems/bundler-1.16.2/lib/bundler/vendor/thor/lib/thor.rb:387:in `dispatch'
/Users/janjezek/.rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/gems/bundler-1.16.2/lib/bundler/cli.rb:27:in `dispatch'
/Users/janjezek/.rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/gems/bundler-1.16.2/lib/bundler/vendor/thor/lib/thor/base.rb:466:in `start'
/Users/janjezek/.rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/gems/bundler-1.16.2/lib/bundler/cli.rb:18:in `start'
/Users/janjezek/.rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/gems/bundler-1.16.2/exe/bundle:30:in `block in <top (required)>'
/Users/janjezek/.rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/gems/bundler-1.16.2/lib/bundler/friendly_errors.rb:124:in `with_friendly_errors'
/Users/janjezek/.rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/gems/bundler-1.16.2/exe/bundle:22:in `<top (required)>'
/Users/janjezek/.rbenv/versions/2.3.3/bin/bundle:22:in `load'
/Users/janjezek/.rbenv/versions/2.3.3/bin/bundle:22:in `<main>'
Gem::LoadError: can't activate mysql2 (~> 0.3.10), already activated mysql2-0.4.10. Make sure all dependencies are added to Gemfile.
/Users/janjezek/.rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/gems/bundler-1.16.2/lib/bundler/rubygems_integration.rb:408:in `block (2 levels) in replace_gem'
/Users/janjezek/.rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/gems/activerecord-3.2.22/lib/active_record/connection_adapters/mysql2_adapter.rb:3:in `<top (required)>'
/Users/janjezek/.rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/gems/activesupport-3.2.22/lib/active_support/dependencies.rb:251:in `require'
/Users/janjezek/.rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/gems/activesupport-3.2.22/lib/active_support/dependencies.rb:251:in `block in require'
/Users/janjezek/.rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/gems/activesupport-3.2.22/lib/active_support/dependencies.rb:236:in `load_dependency'
/Users/janjezek/.rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/gems/activesupport-3.2.22/lib/active_support/dependencies.rb:251:in `require'
/Users/janjezek/.rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/gems/activerecord-3.2.22/lib/active_record/connection_adapters/abstract/connection_specification.rb:50:in `resolve_hash_connection'
/Users/janjezek/.rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/gems/activerecord-3.2.22/lib/active_record/connection_adapters/abstract/connection_specification.rb:29:in `spec'
/Users/janjezek/.rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/gems/activerecord-3.2.22/lib/active_record/connection_adapters/abstract/connection_specification.rb:130:in `establish_connection'
/Users/janjezek/.rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/gems/activerecord-3.2.22/lib/active_record/railties/databases.rake:101:in `create_database'
/Users/janjezek/.rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/gems/activerecord-3.2.22/lib/active_record/railties/databases.rake:62:in `block (3 levels) in <top (required)>'
/Users/janjezek/.rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/gems/activerecord-3.2.22/lib/active_record/railties/databases.rake:62:in `each'
/Users/janjezek/.rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/gems/activerecord-3.2.22/lib/active_record/railties/databases.rake:62:in `block (2 levels) in <top (required)>'
/Users/janjezek/.rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/gems/rake-10.5.0/lib/rake/task.rb:240:in `block in execute'
/Users/janjezek/.rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/gems/rake-10.5.0/lib/rake/task.rb:235:in `each'
/Users/janjezek/.rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/gems/rake-10.5.0/lib/rake/task.rb:235:in `execute'
/Users/janjezek/.rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/gems/rake-10.5.0/lib/rake/task.rb:179:in `block in invoke_with_call_chain'
/Users/janjezek/.rbenv/versions/2.3.3/lib/ruby/2.3.0/monitor.rb:214:in `mon_synchronize'
/Users/janjezek/.rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/gems/rake-10.5.0/lib/rake/task.rb:172:in `invoke_with_call_chain'
/Users/janjezek/.rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/gems/rake-10.5.0/lib/rake/task.rb:201:in `block in invoke_prerequisites'
/Users/janjezek/.rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/gems/rake-10.5.0/lib/rake/task.rb:199:in `each'
/Users/janjezek/.rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/gems/rake-10.5.0/lib/rake/task.rb:199:in `invoke_prerequisites'
/Users/janjezek/.rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/gems/rake-10.5.0/lib/rake/task.rb:178:in `block in invoke_with_call_chain'
/Users/janjezek/.rbenv/versions/2.3.3/lib/ruby/2.3.0/monitor.rb:214:in `mon_synchronize'
/Users/janjezek/.rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/gems/rake-10.5.0/lib/rake/task.rb:172:in `invoke_with_call_chain'
/Users/janjezek/.rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/gems/rake-10.5.0/lib/rake/task.rb:201:in `block in invoke_prerequisites'
/Users/janjezek/.rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/gems/rake-10.5.0/lib/rake/task.rb:199:in `each'
/Users/janjezek/.rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/gems/rake-10.5.0/lib/rake/task.rb:199:in `invoke_prerequisites'
/Users/janjezek/.rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/gems/rake-10.5.0/lib/rake/task.rb:178:in `block in invoke_with_call_chain'
/Users/janjezek/.rbenv/versions/2.3.3/lib/ruby/2.3.0/monitor.rb:214:in `mon_synchronize'
/Users/janjezek/.rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/gems/rake-10.5.0/lib/rake/task.rb:172:in `invoke_with_call_chain'
/Users/janjezek/.rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/gems/rake-10.5.0/lib/rake/task.rb:165:in `invoke'
/Users/janjezek/.rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/gems/rake-10.5.0/lib/rake/application.rb:150:in `invoke_task'
/Users/janjezek/.rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/gems/rake-10.5.0/lib/rake/application.rb:106:in `block (2 levels) in top_level'
/Users/janjezek/.rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/gems/rake-10.5.0/lib/rake/application.rb:106:in `each'
/Users/janjezek/.rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/gems/rake-10.5.0/lib/rake/application.rb:106:in `block in top_level'
/Users/janjezek/.rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/gems/rake-10.5.0/lib/rake/application.rb:115:in `run_with_threads'
/Users/janjezek/.rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/gems/rake-10.5.0/lib/rake/application.rb:100:in `top_level'
/Users/janjezek/.rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/gems/rake-10.5.0/lib/rake/application.rb:78:in `block in run'
/Users/janjezek/.rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/gems/rake-10.5.0/lib/rake/application.rb:176:in `standard_exception_handling'
/Users/janjezek/.rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/gems/rake-10.5.0/lib/rake/application.rb:75:in `run'
/Users/janjezek/.rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/gems/rake-10.5.0/bin/rake:33:in `<top (required)>'
/Users/janjezek/.rbenv/versions/2.3.3/bin/rake:22:in `load'
/Users/janjezek/.rbenv/versions/2.3.3/bin/rake:22:in `<top (required)>'
/Users/janjezek/.rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/gems/bundler-1.16.2/lib/bundler/cli/exec.rb:74:in `load'
/Users/janjezek/.rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/gems/bundler-1.16.2/lib/bundler/cli/exec.rb:74:in `kernel_load'
/Users/janjezek/.rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/gems/bundler-1.16.2/lib/bundler/cli/exec.rb:28:in `run'
/Users/janjezek/.rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/gems/bundler-1.16.2/lib/bundler/cli.rb:424:in `exec'
/Users/janjezek/.rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/gems/bundler-1.16.2/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
/Users/janjezek/.rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/gems/bundler-1.16.2/lib/bundler/vendor/thor/lib/thor/invocation.rb:126:in `invoke_command'
/Users/janjezek/.rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/gems/bundler-1.16.2/lib/bundler/vendor/thor/lib/thor.rb:387:in `dispatch'
/Users/janjezek/.rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/gems/bundler-1.16.2/lib/bundler/cli.rb:27:in `dispatch'
/Users/janjezek/.rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/gems/bundler-1.16.2/lib/bundler/vendor/thor/lib/thor/base.rb:466:in `start'
/Users/janjezek/.rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/gems/bundler-1.16.2/lib/bundler/cli.rb:18:in `start'
/Users/janjezek/.rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/gems/bundler-1.16.2/exe/bundle:30:in `block in <top (required)>'
/Users/janjezek/.rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/gems/bundler-1.16.2/lib/bundler/friendly_errors.rb:124:in `with_friendly_errors'
/Users/janjezek/.rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/gems/bundler-1.16.2/exe/bundle:22:in `<top (required)>'
/Users/janjezek/.rbenv/versions/2.3.3/bin/bundle:22:in `load'
/Users/janjezek/.rbenv/versions/2.3.3/bin/bundle:22:in `<main>'
Tasks: TOP => db:setup => db:schema:load_if_ruby => db:create