[RUBY] rails error Library not loaded

When I tried to use it after a long time, errors occurred frequently. Post a record.

error contents

rails --version

After checking the version with the above command I got the following error.

Library not loaded: /usr/local/opt ~

Response to errors

As a result of various investigations I tried the following command

brew update && brew upgrade

brew reinstall openssl

I tried changing the version of ruby without solving it.

rbenv versions
#Check version of ruby

rbenv install -l
#List of ruby versions that can be installed
#The list will change with the update of brew.

rbenv install 2.6.6
#Temporarily 2.6.If you want to install 6 this

rbenv local 2.1.5
#Change the version used, this is important

For the time being, this solved the error. It seemed to be caused by updating brew before.

Recommended Posts

rails error Library not loaded
ffi Library not loaded: fix error in /opt/brew/opt/libffi/lib/libffi.6.dylib
Library not loaded: support for /usr/local/opt/openssl/lib/libcrypto.1.0.0.dylib (LoadError)
Fix in 5 seconds Library not loaded: /usr/local/opt/openssl/lib/libssl.1.0.0.dylib
[Note] Rails error list
Catch Rails Routing Error
[Rails error] unexpected tIDENTIFIER
Mac Rails Install Error
rails heroku error log
rails error resolution summary
Rails must be exist error (@save is not executed)
Rails5 Rspec test error ArgumentError: Factory not registered: user
Error: Main class not found or could not be loaded
Rails 6 startup error "Webpacker configuration file not found" Solution
Library not loaded when trying to upgrade the version of ruby and rails s
"tx" is not bound error
Error in rails db: migrate
[Rails 6] jQuery introduction ・ uncaught reference error $ is not defined Error solution
[Rails] Rails version upgrade error memorandum
Error when using rails capybara
[Rails] fields_for is not displayed
[rails] error during devise installation
[Rails] What was the error message?
[Rails] Japanese localization of error messages
[Rails] Unexpected validation error in devise
Error: EPERM: operation not permitted, open'/usr/src/app/src/App.vue'
[Rails] Display form error messages asynchronously
rails AWS deployment is not reflected
Japanese localization of error messages (rails)
Add Not null constraint after Rails
Error in ./gradlew: Symbol not found
Data is not registered in Rails.
[Rails] syntax error, unexpected tSTRING_END, expecting'''
[Rails] AWS deployment error encounter summary
"" Application.js "is not present in the asset pipeline" error in Ruby on Rails
[Rails] About the error that the image is not displayed in the production environment