ruby on rails — Could not find gem ‘mysql2’

I got the above issue when I tried to cre­ate a new project with rails and asked it to use mysql instead of the default sqlite database.

Appar­ently, I didnt have mysql installed on my #mac. The fol­low­ing com­mand did the trick.

brew install mysql

You get the com­mand ‘brew’ from Home­brew which is a pack­age man­ager for osx in case you didnt have it already.

Ryan Sukale

Ryan is a UX engineer living in San Francisco, California.

You may also like...