Solved! extconf.rb Failed when installing mysql ruby gem

mysql extconf.rb failed error

The message in your terminal is a summary, not the error. *** extconf.rb failed *** means the gem’s configure script gave up; why it gave up is in mkmf.log, and RubyGems prints the exact path to it. Open that file and read it from the bottom: To see why this extension failed to compile, please … Read more

RubyGems Is Already Installed: Here’s How to Check

ubuntu install rubygems

Run gem -v. If that prints a version number, RubyGems is already installed — it ships inside Ruby itself and has since Ruby 1.9, so there is no separate “install RubyGems” step for any Ruby you’d install today. RubyGems’ own guide states it plainly: “RubyGems ships with Ruby, so the gem command is available as … Read more

sqlite3 Ruby Gem LoadError and mkmf Errors: What Each Means

ruby on rails

Three different errors get called “the sqlite3 mkmf error”, and the text tells you which one you have. Read the last line, not the wall above it: cannot load such file — sqlite3 (LoadError) # the gem is not installed, or not on this load path cannot load such file — sqlite3/sqlite3_native (LoadError) # the … Read more

Ruby SSH Scripts with Net::SSH: Verify the Host Key

ruby on rails

A script that prints your password to standard output every time the connection fails — and exits 0 while doing it — is not a style problem. The exception it swallows includes Net::SSH::HostKeyMismatch, which is the signal that the host key of the server you are about to authenticate to has changed. Use this instead: … Read more