`require': no such file to load -- mkmf (LoadError)
After some search for a solution it turns out the -dev
package is needed, not just ruby1.8
. So if you have ruby1.9.1
doing
sudo apt-get install ruby1.9.1-dev
or to install generic ruby version, use (as per @lamplightdev comment):
sudo apt-get install ruby-dev
should fix it.
Try locate mkmf
to see if the file is actually there.
Unable to install gem - Failed to build gem native extension - cannot load such file -- mkmf (LoadError)
There are similar questions:
- `require': no such file to load -- mkmf (LoadError)
- Failed to build gem native extension (mkmf (LoadError)) - Ubuntu 12.04
Usually, the solution is:
sudo apt-get install ruby-dev
Or, if that doesn't work, depending on your ruby version, run something like:
sudo apt-get install ruby1.9.1-dev
Should fix your problem.
Still not working? Try the following after installing ruby-dev:
sudo apt-get install make
Failed to build gem native extension (mkmf (LoadError)) - Ubuntu 12.04
Possible duplicate of:
Unable to install gem - Failed to build gem native extension - cannot load such file -- mkmf (LoadError)
Depending on your ruby version, run:
sudo apt-get install ruby1.9.1-dev
Error installing gem failed to build gem native extensions -- cannot load such file -- mkmf
if you're using RVM, you shouldn't ever be using 'sudo'. Using sudo calls libs and such out of the rvm path. Try just a flat
gem install thin
and see if that helps.
~Kevin
Related Topics
Match a String Against Multiple Patterns
Rake "Already Initialized Constant Wfkv_" Warning
Read and Write Yaml Files Without Destroying Anchors and Aliases
How to Get the Name of a Ruby Class
Rvm 'Not Found' After Successful Usage and a Few Days Later
Passing Parameters from View to Controller
How to Create an Object Who Act as a False in Ruby
What's the 'Ruby Way' to Iterate Over Two Arrays at Once
How to Make Sinatra Work Over Https/Ssl
How to Format the Value Shown in a Rails Edit Field
How to Access a Variable Defined in a Ruby File I Required in Irb
Ignoring Gem Because Its Extensions Are Not Built
Is the &Method(:Method_Name) Idiom Bad for Performance in Ruby