Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

It is definitely possible to install the mysql2 gem on Ubuntu 21 with Ruby 2.7.6. Here are the steps:

  1. Update the Ubuntu package manager:

    sudo apt-get update
    
  2. Install the MySQL client library:

    sudo apt-get install libmysqlclient-dev
    
  3. Install the mysql2 gem:

    gem install mysql2
    

If you encounter any issues during the installation process, you may need to install additional dependencies or troubleshoot your Ruby and MySQL installations.