Library not loaded when trying to upgrade the version of ruby and rails s

Error excerpt

/Users/hoge-user/projects/freee-auth/vendor/bundle/ruby/2.6.0/gems/bootsnap-1.4.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require': dlopen(/Users/hoge-user/projects/freee-auth/vendor/bundle/ruby/2.6.0/gems/mysql2-0.4.10/lib/mysql2/mysql2.bundle, 9): Library not loaded: /usr/local/opt/openssl/lib/libssl.1.0.0.dylib (LoadError)
  Referenced from: /Users/hoge-user/projects/freee-auth/vendor/bundle/ruby/2.6.0/gems/mysql2-0.4.10/lib/mysql2/mysql2.bundle
  Reason: image not found - /Users/hoge-user/projects/freee-auth/vendor/bundle/ruby/2.6.0/gems/mysql2-0.4.10/lib/mysql2/mysql2.bundle

Library not loaded: /usr/local/opt/openssl/lib/libssl.1.0.0.dylib (LoadError) Because it says bundle doctor

The following gems are missing OS dependencies:
 * mysql2: /usr/local/opt/openssl/lib/libcrypto.1.0.0.dylib
 * mysql2: /usr/local/opt/openssl/lib/libssl.1.0.0.dylib

It says something is missing from the openssl family that mysql depends on. Is it because openssl was replaced with the version upgrade of ruby? So reinstall mysql and re-install the dependent gem libraries

bundle exec gem uninstall mysql2
bundle install #mysql gem should also be included

rails s worked fine

$ bundle exec rails s -p 3099
=> Booting Puma
=> Rails application starting in development
=> Run `rails server -h` for more startup options
Puma starting in single mode...
* Version 4.3.1 (ruby 2.6.6-p146), codename: Mysterious Traveller
* Min threads: 5, max threads: 5
* Environment: development
* Listening on tcp://
* Listening on tcp://[::1]:3099

Recommended Posts

Library not loaded when trying to upgrade the version of ruby and rails s
Project ruby and rails version upgrade
[Rails] [Memo] When to add = to <%%> and when not
When the server does not start with rails s
rails error Library not loaded
What I did in the version upgrade from Ruby 2.5.2 to 2.7.1
[Rails] When the layout change of devise is not reflected
[Ruby On Rails] How to search and save the data of the parent table from the child table
How to solve the problem when the value is not sent when the form is disabled in rails and sent
I get a Ruby version error when I try to start Rails.
[Rails] What to do when rails s does not respond or does not stop
[Rails] Read the RSS of the site and return the contents to the front
Things to remember and concepts in the Ruby on Rails tutorial
What to do if the app is not created with the latest Rails version installed when rails new
Method definition location Summary of how to check When defined in the project and Rails / Gem
[Rails] About the error when displaying the screen due to the autofocus of the form
A note of someone who stumbled when trying to create a Rails project
[Ruby] I want to extract only the value of the hash and only the key
Environment construction of Ruby on Rails from 0 [Cloud9] (From Ruby version change to Rails installation)
How to constrain the action of the transition destination when not logged in
How to solve the local environment construction of Ruby on Rails (MAC)!
[Rails] The cause of not being able to post was in form_with
Ruby on Rails When you don't know the cause of rollback when saving.
[Ruby On Rails] How to search the contents of params using include?
[Rails] Articles for beginners to organize and understand the flow of form_with
Change the save destination of the image to S3 in the Rails app. Part 2
part of the syntax of ruby ​​on rails
[Easy] How to upgrade Ruby and bundler
The process of introducing Vuetify to Rails
[Rails] What to do when the Refile image is not displayed when writing the processing at the time of Routing Error
[Ruby on Rails] How to make the link destination part of the specified id
[Promotion of Ruby comprehension (1)] When switching from Java to Ruby, first understand the difference.
[Ruby on Rails] Change the update date and creation date to your favorite notation
What to do when rails db: seed does not reflect in the database
[Ruby on Rails] Rails tutorial Chapter 14 Summary of how to implement the status feed
[Ruby] Meaning of &. How to avoid the error when the receiver (object) is nil
Introduce Docker to the development environment and test environment of existing Rails and MySQL applications
[Ruby on Rails] How to Japaneseize the error message of Form object (ActiveModel)
How to find the cause of the Ruby error
Check the version of the JDK installed and the version of the JDK enabled
[Rails] Button to return to the top of the page
[Rails] I tried to raise the Rails version from 5.0 to 5.2
[Java] Access the signed URL of s3 (signed version 2)
What to do when ‘Could not find’ in any of the sources appears in the development environment with Docker × Rails × RSpec
When the Ruby on Rails terminal rolls back
The story of introducing Ajax communication to ruby
Manage the version of Ruby itself with rbenv
[Ruby] "Reference to object" and "Contents of variable"
Ruby on Rails ~ Basics of MVC and Router ~
[Ruby] Code to display the day of the week
When changing the Controller of Spring Web MVC to kotlin, @Autowired The specified component is not injected and becomes null.
Final confirmation when ruby version does not switch
Does not recognize the library when implementing jcaptcha
[Ruby on Rails] Implementation of validation that works only when the conditions are met
[rails] After option useful when you want to change the order of DB columns
[In team development] Error when moving to another member's branch and doing rails s [Rails]
[Ruby on rails] When executing the heroku command, bash: heroku: command not found is displayed. [Rails tutorial]
[ruby] How to assign a value to a hash by referring to the value and key of another hash
[Rough explanation] How to separate the operation of the production environment and the development environment with Rails
Explanation of Ruby on rails for beginners ④ ~ Naming convention and how to use form_Tag ~
When the hover of Eclipse is hard to see