Home>
The code below is the description when the rails db:create command is executed on the terminal.
rooter:portfolio apple$rails db:create
rails aborted!
LoadError: dlopen(/Library/Ruby/Gems/2.6.0/gems/mysql2-0.5.3/lib/mysql2/mysql2.bundle, 0x0009): dependent dylib'/usr/local/opt/[email protected]/lib/ libmysqlclient.20.dylib' not found for'/Library/Ruby/Gems/2.6.0/gems/mysql2-0.5.3/lib/mysql2/mysql2.bundle'-/Library/Ruby/Gems/2.6.0/gems /mysql2-0.5.3/lib/mysql2/mysql2.bundle
/Library/Ruby/Gems/2.6.0/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `require'
/Library/Ruby/Gems/2.6.0/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `block in require_with_bootsnap_lfi'
/Library/Ruby/Gems/2.6.0/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in `register'
/Library/Ruby/Gems/2.6.0/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require_with_bootsnap_lfi'
/Library/Ruby/Gems/2.6.0/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:31:in `require'
/Library/Ruby/Gems/2.6.0/gems/activesupport-6.0.3.1/lib/active_support/dependencies.rb:324:in `block in require'
/Library/Ruby/Gems/2.6.0/gems/activesupport-6.0.3.1/lib/active_support/dependencies.rb:291:in `load_dependency'
/Library/Ruby/Gems/2.6.0/gems/activesupport-6.0.3.1/lib/active_support/dependencies.rb:324:in `require'
/Library/Ruby/Gems/2.6.0/gems/mysql2-0.5.3/lib/mysql2.rb:36:in `<main>'
/Library/Ruby/Gems/2.6.0/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `require'
/Library/Ruby/Gems/2.6.0/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `block in require_with_bootsnap_lfi'
/Library/Ruby/Gems/2.6.0/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in `register'
/Library/Ruby/Gems/2.6.0/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require_with_bootsnap_lfi'
/Library/Ruby/Gems/2.6.0/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:31:in `require'
/Library/Ruby/Gems/2.6.0/gems/bundler-2.1.4/lib/bundler/runtime.rb:74:in `block (2 levels) in require'
/Library/Ruby/Gems/2.6.0/gems/bundler-2.1.4/lib/bundler/runtime.rb:69:in `each'
/Library/Ruby/Gems/2.6.0/gems/bundler-2.1.4/lib/bundler/runtime.rb:69:in `block in require'
/Library/Ruby/Gems/2.6.0/gems/bundler-2.1.4/lib/bundler/runtime.rb:58:in `each'
/Library/Ruby/Gems/2.6.0/gems/bundler-2.1.4/lib/bundler/runtime.rb:58:in `require'
/Library/Ruby/Gems/2.6.0/gems/bundler-2.1.4/lib/bundler.rb:174:in `require'/Users/apple/create/portfolio/config/application.rb:7:in `<main>'
/Library/Ruby/Gems/2.6.0/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `require'
/Library/Ruby/Gems/2.6.0/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `block in require_with_bootsnap_lfi'
/Library/Ruby/Gems/2.6.0/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in `register'
/Library/Ruby/Gems/2.6.0/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require_with_bootsnap_lfi'
/Library/Ruby/Gems/2.6.0/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:31:in `require'
/Library/Ruby/Gems/2.6.0/gems/activesupport-6.0.3.1/lib/active_support/dependencies.rb:324:in `block in require'
/Library/Ruby/Gems/2.6.0/gems/activesupport-6.0.3.1/lib/active_support/dependencies.rb:291:in `load_dependency'
/Library/Ruby/Gems/2.6.0/gems/activesupport-6.0.3.1/lib/active_support/dependencies.rb:324:in `require'
/Library/Ruby/Gems/2.6.0/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:49:in `require_relative'
/Users/apple/create/portfolio/Rakefile:4:in `<main>'
/Library/Ruby/Gems/2.6.0/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:55:in `load'
/Library/Ruby/Gems/2.6.0/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:55:in `load'
/Library/Ruby/Gems/2.6.0/gems/activesupport-6.0.3.1/lib/active_support/dependencies.rb:318:in `block in load'
/Library/Ruby/Gems/2.6.0/gems/activesupport-6.0.3.1/lib/active_support/dependencies.rb:291:in `load_dependency'
/Library/Ruby/Gems/2.6.0/gems/activesupport-6.0.3.1/lib/active_support/dependencies.rb:318:in `load'
/Library/Ruby/Gems/2.6.0/gems/railties-6.0.3.1/lib/rails/commands/rake/rake_command.rb:22:in `block in perform'
/Library/Ruby/Gems/2.6.0/gems/railties-6.0.3.1/lib/rails/commands/rake/rake_command.rb:20:in `perform'
/Library/Ruby/Gems/2.6.0/gems/railties-6.0.3.1/lib/rails/command.rb:48:in `invoke'
/Library/Ruby/Gems/2.6.0/gems/railties-6.0.3.1/lib/rails/commands.rb:18:in `<main>'
/Library/Ruby/Gems/2.6.0/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `require'
/Library/Ruby/Gems/2.6.0/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `block in require_with_bootsnap_lfi'
/Library/Ruby/Gems/2.6.0/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in `register'
/Library/Ruby/Gems/2.6.0/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require_with_bootsnap_lfi'/Library/Ruby/Gems/2.6.0/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:31:in `require'
/Library/Ruby/Gems/2.6.0/gems/activesupport-6.0.3.1/lib/active_support/dependencies.rb:324:in `block in require'
/Library/Ruby/Gems/2.6.0/gems/activesupport-6.0.3.1/lib/active_support/dependencies.rb:291:in `load_dependency'
/Library/Ruby/Gems/2.6.0/gems/activesupport-6.0.3.1/lib/active_support/dependencies.rb:324:in `require'
/Users/apple/create/portfolio/bin/rails:9:in `<top (required)>'
/Library/Ruby/Gems/2.6.0/gems/spring-2.1.0/lib/spring/client/rails.rb:28:in `load'
/Library/Ruby/Gems/2.6.0/gems/spring-2.1.0/lib/spring/client/rails.rb:28:in `call'
/Library/Ruby/Gems/2.6.0/gems/spring-2.1.0/lib/spring/client/command.rb:7:in `call'
/Library/Ruby/Gems/2.6.0/gems/spring-2.1.0/lib/spring/client.rb:30:in `run'
/Library/Ruby/Gems/2.6.0/gems/spring-2.1.0/bin/spring:49:in `<top (required)>'
/Library/Ruby/Gems/2.6.0/gems/spring-2.1.0/lib/spring/binstub.rb:11:in `load'
/Library/Ruby/Gems/2.6.0/gems/spring-2.1.0/lib/spring/binstub.rb:11:in `<top (required)>'
/Users/apple/create/portfolio/bin/spring:15:in `<top (required)>'
bin/rails:3:in `load'
bin/rails:3:in `<main>'
(See full trace by running task with --trace)
Looking at this sentence, the contents of the dependency were displayed, so I wonder if the reason is that the version of MYsql in the gem of the application I am creating this time is different from the version of MYsql set by the Linux command. think.
The version of Mysql created this time has gem'mysql2' set, and mysql is used in the Linux command.
Also, I wonder if the path setting may be the cause, I set the arbitrary path before myself, and Mysql5.7 in the following display is not set, so,
rooter:portfolio apple$echo $PATH
/usr/local/opt/[email protected]/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/opt/[email protected]/bin:/ usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/opt/[email protected]/bin:/usr/local/opt/[email protected]/bin:/usr /local/bin:/usr/bin:/bin:/usr/sbin:/sbin
Please professor,
-
Answer # 1
Related articles
- about ruby error statement
- intel joule - please tell me about the bioss settings
- parameters - about error when calculating python sarimx parameter optimization
- mysql - about the rds engine version
- about the meaning of in the dart if statement
- ruby on rails 5 - about lint/syntax error of rubocop
- ruby - about the error content displayed in "rails" rspec
- ruby - i want to resolve the error statement "/ users/sign_up" in devise's no route matches [post]
- mysql - access denied for user error in xserver
- about unpickling error in python socket communication
- vba - about index error
- python - about openpyxl error avoidance
- unable to boot with mysql error number 28 means'no space left on device'!
- mysql2 :: error :: connectionerror when trying to auto-deploy with bundle exec cap production deploy
- about python if statement conditional expressions
- mysql - about database structure and how to hold data
- ruby on rails 6 - about rails error "wrong number of arguments (given 1, expected 0)"
- api - please tell me about the bind () function and listen () function of socket
- about management screen error in wordpress version 55
- [rails] bundle exec rake db: create error cannot be resolved [mysql]
Related questions
- ruby - when posting an image, an error occurs where the image is not defined
- mysql - bundle install will not be executed
- [rails] bundle exec rake db: create error cannot be resolved [mysql]
- mysql - can't db: migrate to heroku
- unable to boot with mysql error number 28 means'no space left on device'!
- ruby - can't db: migrate after deploying to heroku
- what to do if you can't start mysql
- ruby - i want to retrieve only the values of a specific column from the rails array
- mysql - rails search function other models
- ruby - i want to display new posts i made on the top page only for myself
In this case it is written first
'/usr/local/opt/[email protected]/lib/libmysqlclient.20.dylib' not found
I'm getting an error that dylib is missing to run mysql2.
Since mysql2 is a gem, it doesn't matter that the version notation is different from mysql. Is it different from when you gem installed mysql2 and the version of mysql?
I think that you can get more appropriate advice from people by writing the OS and other environments.
It says Linux, but it's not a Linux dir name, so... Is it a Mac?