Skip to content

rake db:create fails on docker setup #229

@MatheusRich

Description

@MatheusRich

Hi! I was trying to setup my development environment with docker. I've followed the tutorial on README.md, but i fails after running docker-compose run amahi_web bundle exec rake db:create.

Here's the output:

Starting platform_amahi_box_1_dfd960b06721 ... done
Starting amahi_mysqldb                     ... done
Authentication plugin 'caching_sha2_password' cannot be loaded: /usr/lib64/mysql/plugin/caching_sha2_password.so: cannot open shared object file: No such file or directory
Couldn't create database for {"adapter"=>"mysql2", "encoding"=>"utf8", "pool"=>5, "database"=>"amahi_dev", "host"=>"amahi_mysqldb", "username"=>"root", "password"=>"test123"}
rake aborted!
Mysql2::Error: Authentication plugin 'caching_sha2_password' cannot be loaded: /usr/lib64/mysql/plugin/caching_sha2_password.so: cannot open shared object file: No such file or directory
/box/gems/mysql2-0.5.1/lib/mysql2/client.rb:90:in `connect'
/box/gems/mysql2-0.5.1/lib/mysql2/client.rb:90:in `initialize'
/box/gems/activerecord-5.2.0/lib/active_record/connection_adapters/mysql2_adapter.rb:22:in `new'
/box/gems/activerecord-5.2.0/lib/active_record/connection_adapters/mysql2_adapter.rb:22:in `mysql2_connection'
/box/gems/activerecord-5.2.0/lib/active_record/connection_adapters/abstract/connection_pool.rb:809:in `new_connection'
/box/gems/activerecord-5.2.0/lib/active_record/connection_adapters/abstract/connection_pool.rb:853:in `checkout_new_connection'
/box/gems/activerecord-5.2.0/lib/active_record/connection_adapters/abstract/connection_pool.rb:832:in `try_to_checkout_new_connection'
/box/gems/activerecord-5.2.0/lib/active_record/connection_adapters/abstract/connection_pool.rb:793:in `acquire_connection'
/box/gems/activerecord-5.2.0/lib/active_record/connection_adapters/abstract/connection_pool.rb:521:in `checkout'
/box/gems/activerecord-5.2.0/lib/active_record/connection_adapters/abstract/connection_pool.rb:380:in `connection'
/box/gems/activerecord-5.2.0/lib/active_record/connection_adapters/abstract/connection_pool.rb:1008:in `retrieve_connection'
/box/gems/activerecord-5.2.0/lib/active_record/connection_handling.rb:118:in `retrieve_connection'
/box/gems/activerecord-5.2.0/lib/active_record/connection_handling.rb:90:in `connection'
/box/gems/activerecord-5.2.0/lib/active_record/tasks/mysql_database_tasks.rb:6:in `connection'
/box/gems/activerecord-5.2.0/lib/active_record/tasks/mysql_database_tasks.rb:14:in `create'
/box/gems/activerecord-5.2.0/lib/active_record/tasks/database_tasks.rb:119:in `create'
/box/gems/activerecord-5.2.0/lib/active_record/tasks/database_tasks.rb:139:in `block in create_current'
/box/gems/activerecord-5.2.0/lib/active_record/tasks/database_tasks.rb:316:in `block in each_current_configuration'
/box/gems/activerecord-5.2.0/lib/active_record/tasks/database_tasks.rb:313:in `each'
/box/gems/activerecord-5.2.0/lib/active_record/tasks/database_tasks.rb:313:in `each_current_configuration'
/box/gems/activerecord-5.2.0/lib/active_record/tasks/database_tasks.rb:138:in `create_current'
/box/gems/activerecord-5.2.0/lib/active_record/railties/databases.rake:29:in `block (2 levels) in <top (required)>'
/box/gems/rake-12.3.1/exe/rake:27:in `<top (required)>'
/usr/local/share/gems/gems/bundler-1.14.6/lib/bundler/cli/exec.rb:74:in `load'
/usr/local/share/gems/gems/bundler-1.14.6/lib/bundler/cli/exec.rb:74:in `kernel_load'
/usr/local/share/gems/gems/bundler-1.14.6/lib/bundler/cli/exec.rb:27:in `run'
/usr/local/share/gems/gems/bundler-1.14.6/lib/bundler/cli.rb:335:in `exec'
/usr/local/share/gems/gems/bundler-1.14.6/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
/usr/local/share/gems/gems/bundler-1.14.6/lib/bundler/vendor/thor/lib/thor/invocation.rb:126:in `invoke_command'
/usr/local/share/gems/gems/bundler-1.14.6/lib/bundler/vendor/thor/lib/thor.rb:359:in `dispatch'
/usr/local/share/gems/gems/bundler-1.14.6/lib/bundler/cli.rb:20:in `dispatch'
/usr/local/share/gems/gems/bundler-1.14.6/lib/bundler/vendor/thor/lib/thor/base.rb:440:in `start'
/usr/local/share/gems/gems/bundler-1.14.6/lib/bundler/cli.rb:11:in `start'
/usr/local/share/gems/gems/bundler-1.14.6/exe/bundle:32:in `block in <top (required)>'
/usr/local/share/gems/gems/bundler-1.14.6/lib/bundler/friendly_errors.rb:121:in `with_friendly_errors'
/usr/local/share/gems/gems/bundler-1.14.6/exe/bundle:24:in `<top (required)>'
/usr/local/bin/bundle:22:in `load'
/usr/local/bin/bundle:22:in `<main>'
Tasks: TOP => db:create
(See full trace by running task with --trace)

Am I missing something? Let me know!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions