1
votes

I am having some problems when trying to install mysql2 gem for Rails. When I try to install it by running bundle install or gem install mysql2 it gives me the following error:

Error installing mysql2: ERROR: Failed to build gem native extension.

Also tried the command yum install mysql-devel as well. Still getting same error.

How can I fix this and successfully install mysql2?

1

1 Answers

2
votes

Please try with running

brew install mysql

or try with below if you are getting permission denied problems.

sudo yum install mysql-devel