Failed to Build Gem Native Extension When Install Redcloth-4.2.9 Install Linux

Failed to build gem native extension when install RedCloth-4.2.9 install Linux

You've probably upgraded to Mountain Lion and have not rebuilt your ruby-1.9.2 install yet with the new development packages.

rvm --force install 1.9.2
gem install bundle --no-ri --no-rdoc
bundle install

If you don't have the Mountain Lion dev packages installed correctly, use the ThoughtBot instructions.

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

Ignoring GEM because its extensions are not built

I came across this exact issue today - getting warnings like this for gems that weren't even installed!

... Well, it turns out the gems were installed - for a different ruby than the one I had set active with chruby (2.2.3 vs 2.3.1).

Switching to all the different rubies and running gem pristine --all on all of them solved the problem.



Related Topics



Leave a reply



Submit