0

This is the version of my ruby and rails.

ruby 2.6.3p62 Rails 5.2.3

I input this code to make rails app.

$ rails new Vessel_Trade_Queen -d mysql

Then I executed this command and have error...

$ rails s

Traceback (most recent call last):
    46: from bin/rails:4:in `<main>'
    45: from /Users/naganoyuki/Desktop/Vessel_Trade_Queen/vendor/bundle/ruby/2.6.0/gems/activesupport-5.2.3/lib/active_support/dependencies.rb:291:in `require'
    44: from /Users/naganoyuki/Desktop/Vessel_Trade_Queen/vendor/bundle/ruby/2.6.0/gems/activesupport-5.2.3/lib/active_support/dependencies.rb:257:in `load_dependency'
    43: from /Users/naganoyuki/Desktop/Vessel_Trade_Queen/vendor/bundle/ruby/2.6.0/gems/activesupport-5.2.3/lib/active_support/dependencies.rb:291:in `block in require'
    42: from /Users/naganoyuki/Desktop/Vessel_Trade_Queen/vendor/bundle/ruby/2.6.0/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:31:in `require'
    41: from /Users/naganoyuki/Desktop/Vessel_Trade_Queen/vendor/bundle/ruby/2.6.0/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require_with_bootsnap_lfi'
    40: from /Users/naganoyuki/Desktop/Vessel_Trade_Queen/vendor/bundle/ruby/2.6.0/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in `register'
    39: from /Users/naganoyuki/Desktop/Vessel_Trade_Queen/vendor/bundle/ruby/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'
    38: from /Users/naganoyuki/Desktop/Vessel_Trade_Queen/vendor/bundle/ruby/2.6.0/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `require'
    37: from /Users/naganoyuki/Desktop/Vessel_Trade_Queen/vendor/bundle/ruby/2.6.0/gems/railties-5.2.3/lib/rails/commands.rb:18:in `<main>'
    36: from /Users/naganoyuki/Desktop/Vessel_Trade_Queen/vendor/bundle/ruby/2.6.0/gems/railties-5.2.3/lib/rails/command.rb:46:in `invoke'
    35: from /Users/naganoyuki/Desktop/Vessel_Trade_Queen/vendor/bundle/ruby/2.6.0/gems/railties-5.2.3/lib/rails/command/base.rb:65:in `perform'
    34: from /Users/naganoyuki/Desktop/Vessel_Trade_Queen/vendor/bundle/ruby/2.6.0/gems/thor-1.0.1/lib/thor.rb:392:in `dispatch'
    33: from /Users/naganoyuki/Desktop/Vessel_Trade_Queen/vendor/bundle/ruby/2.6.0/gems/thor-1.0.1/lib/thor/invocation.rb:127:in `invoke_command'
    32: from /Users/naganoyuki/Desktop/Vessel_Trade_Queen/vendor/bundle/ruby/2.6.0/gems/thor-1.0.1/lib/thor/command.rb:27:in `run'
    31: from /Users/naganoyuki/Desktop/Vessel_Trade_Queen/vendor/bundle/ruby/2.6.0/gems/railties-5.2.3/lib/rails/commands/server/server_command.rb:142:in `perform'
    30: from /Users/naganoyuki/Desktop/Vessel_Trade_Queen/vendor/bundle/ruby/2.6.0/gems/railties-5.2.3/lib/rails/commands/server/server_command.rb:142:in `tap'
    29: from /Users/naganoyuki/Desktop/Vessel_Trade_Queen/vendor/bundle/ruby/2.6.0/gems/railties-5.2.3/lib/rails/commands/server/server_command.rb:145:in `block in perform'
    28: from /Users/naganoyuki/Desktop/Vessel_Trade_Queen/vendor/bundle/ruby/2.6.0/gems/activesupport-5.2.3/lib/active_support/dependencies.rb:291:in `require'
    27: from /Users/naganoyuki/Desktop/Vessel_Trade_Queen/vendor/bundle/ruby/2.6.0/gems/activesupport-5.2.3/lib/active_support/dependencies.rb:257:in `load_dependency'
    26: from /Users/naganoyuki/Desktop/Vessel_Trade_Queen/vendor/bundle/ruby/2.6.0/gems/activesupport-5.2.3/lib/active_support/dependencies.rb:291:in `block in require'
    25: from /Users/naganoyuki/Desktop/Vessel_Trade_Queen/vendor/bundle/ruby/2.6.0/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:31:in `require'
    24: from /Users/naganoyuki/Desktop/Vessel_Trade_Queen/vendor/bundle/ruby/2.6.0/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require_with_bootsnap_lfi'
    23: from /Users/naganoyuki/Desktop/Vessel_Trade_Queen/vendor/bundle/ruby/2.6.0/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in `register'
    22: from /Users/naganoyuki/Desktop/Vessel_Trade_Queen/vendor/bundle/ruby/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'
    21: from /Users/naganoyuki/Desktop/Vessel_Trade_Queen/vendor/bundle/ruby/2.6.0/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `require'
    20: from /Users/naganoyuki/Desktop/Vessel_Trade_Queen/config/application.rb:7:in `<main>'
    19: from /Users/naganoyuki/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/bundler-2.0.2/lib/bundler.rb:114:in `require'
    18: from /Users/naganoyuki/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/bundler-2.0.2/lib/bundler/runtime.rb:65:in `require'
    17: from /Users/naganoyuki/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/bundler-2.0.2/lib/bundler/runtime.rb:65:in `each'
    16: from /Users/naganoyuki/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/bundler-2.0.2/lib/bundler/runtime.rb:76:in `block in require'
    15: from /Users/naganoyuki/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/bundler-2.0.2/lib/bundler/runtime.rb:76:in `each'
    14: from /Users/naganoyuki/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/bundler-2.0.2/lib/bundler/runtime.rb:81:in `block (2 levels) in require'
    13: from /Users/naganoyuki/Desktop/Vessel_Trade_Queen/vendor/bundle/ruby/2.6.0/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:31:in `require'
    12: from /Users/naganoyuki/Desktop/Vessel_Trade_Queen/vendor/bundle/ruby/2.6.0/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require_with_bootsnap_lfi'
    11: from /Users/naganoyuki/Desktop/Vessel_Trade_Queen/vendor/bundle/ruby/2.6.0/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in `register'
    10: from /Users/naganoyuki/Desktop/Vessel_Trade_Queen/vendor/bundle/ruby/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'
     9: from /Users/naganoyuki/Desktop/Vessel_Trade_Queen/vendor/bundle/ruby/2.6.0/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `require'
     8: from /Users/naganoyuki/Desktop/Vessel_Trade_Queen/vendor/bundle/ruby/2.6.0/gems/mysql2-0.5.3/lib/mysql2.rb:36:in `<main>'
     7: from /Users/naganoyuki/Desktop/Vessel_Trade_Queen/vendor/bundle/ruby/2.6.0/gems/activesupport-5.2.3/lib/active_support/dependencies.rb:291:in `require'
     6: from /Users/naganoyuki/Desktop/Vessel_Trade_Queen/vendor/bundle/ruby/2.6.0/gems/activesupport-5.2.3/lib/active_support/dependencies.rb:257:in `load_dependency'
     5: from /Users/naganoyuki/Desktop/Vessel_Trade_Queen/vendor/bundle/ruby/2.6.0/gems/activesupport-5.2.3/lib/active_support/dependencies.rb:291:in `block in require'
     4: from /Users/naganoyuki/Desktop/Vessel_Trade_Queen/vendor/bundle/ruby/2.6.0/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:31:in `require'
     3: from /Users/naganoyuki/Desktop/Vessel_Trade_Queen/vendor/bundle/ruby/2.6.0/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require_with_bootsnap_lfi'
     2: from /Users/naganoyuki/Desktop/Vessel_Trade_Queen/vendor/bundle/ruby/2.6.0/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in `register'
     1: from /Users/naganoyuki/Desktop/Vessel_Trade_Queen/vendor/bundle/ruby/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'
/Users/naganoyuki/Desktop/Vessel_Trade_Queen/vendor/bundle/ruby/2.6.0/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `require': dlopen(/Users/naganoyuki/Desktop/Vessel_Trade_Queen/vendor/bundle/ruby/2.6.0/gems/mysql2-0.5.3/lib/mysql2/mysql2.bundle, 9): Library not loaded: /usr/local/opt/mysql/lib/libmysqlclient.21.dylib (LoadError)
  Referenced from: /Users/naganoyuki/Desktop/Vessel_Trade_Queen/vendor/bundle/ruby/2.6.0/gems/mysql2-0.5.3/lib/mysql2/mysql2.bundle
  Reason: image not found - /Users/naganoyuki/Desktop/Vessel_Trade_Queen/vendor/bundle/ruby/2.6.0/gems/mysql2-0.5.3/lib/mysql2/mysql2.bundle

When I try to input $ rails db:migrate, it will not be executed properly. I would appreciate if you have any idea to solve this problem.

Yuki
  • 1
  • I sincerely appreciate your suggestion... when tried command which looks like best one shown in your link, it doesn't work for me.This is what I type : $ sudo ln -s /usr/local/mysql/lib/libmysqlclient.18.dylib /usr/lib/libmysqlclient.18.dylib ////// Then this is the error message I received; ln: /usr/lib/libmysqlclient.18.dylib: Operation not permitted – Yuki Jun 17 '20 at 11:04
  • You probably need to replace `libmysqlclient.18.dylib` with `libmysqlclient.21.dylib` in the command you're trying to run. – scilence Jun 17 '20 at 12:53
  • sir or madam , I really appreciate your help... I finally followed my teacher and we decided to make a new rails app... I deleted this app before i try $libmysqlclient.21.dylib, but I should have tried it. Though I am really thanksfull for your help!! – Yuki Jun 19 '20 at 12:04

0 Answers0