Failed to build gem native extension when install RedCloth-4.2.9 install Linux
octopress, redcloth, ruby
Solution
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.
Problem
I want to install `Octopress` in my computer. I try to do it like Octopress document. When I run ``` bundle install ``` I got error message ``` An error occured while installing RedCloth (4.2.9), and Bundler cannot continue. Make sure that `gem install RedCloth -v '4.2.9'` succeeds before bundling. ``` So, I run ``` sudo gem install RedCloth -v '4.2.9' ``` then, I got a error message again: ``` ERROR: Error installing RedCloth: ERROR: Failed to build gem native extension. /usr/bin/ruby1.9.1 extconf.rb /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require': cannot load such file -- mkmf (LoadError) from /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require' from extconf.rb:1:in `<main>' ``` I hadn't learn any knowledge about ruby.