~# gem install mysql2
Building native extensions. This could take a while...
ERROR: Error installing mysql2:
ERROR: Failed to build gem native extension.
/usr/local/rvm/rubies/ruby-2.0.0-p353/bin/ruby extconf.rb
Gem files will remain installed in /usr/local/rvm/gems/ruby-2.0.0-p353/gems/mysql2-0.3.16 for inspection.
I google and tried the below but still the same error. Pleas help! Thank you!
sudo apt-get install mysql-client libmysqlclient-dev
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
It looks like you are probably missing something needed to compile the mysql2 gem’s C extension. Try installing the following packages:
sudo apt-get install build-essential libmysqlclient-dev
Hi wavrin, asb, thanks for your answer. However, I still have the same error after running your commands.
would appreciate if anyone can give suggestion on how to setup mysql2 on Ubuntu 14.04. It is a new droplet that i just created yesterday.
I guess you can reproduce this by creating a new temporary droplet Ubuntu 14.04 with ruby and rails
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.