skip to Main Content

ruby 2.5.1
macOS Sonoma Beta

Run

rails server

Error

/.rvm/gems/ruby-2.5.1/gems/mysql2-0.5.3/lib/mysql2/mysql2.bundle, 0x0009): Library not loaded: /usr/local/opt/mysql/lib/libmysqlclient.21.dylib (LoadError)

i want run my ruby and rails app.

2

Answers


  1. Chosen as BEST ANSWER

    install

    gem install bundler -v 2.3.26
    

    uninstall all mysql gem

    gem uninstall mysql2
    

    and install again

    bundler install  
    

  2. I was able to use mysql2 (0.5.5) Apple Silicon macOS Ventura (13.5.2) Ruby (3.1.4) by:

    Removing the default brew formula of MySQL. This points to MySQL 8.1 which I am not using.

    brew uninstall mysql
    

    Installing and linking the formula for MySQL 8.0. This is safe because it should be the only one installed on your system.

    brew install [email protected]
    brew link [email protected]
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search