Error while installing json gem ‘mkmf.rb can’t find header files for ruby’
Modern era update, as stated by mimoralea: In case that you are using ruby 2.0 or 2.2 (thanks @patrick-davey). sudo apt-get install ruby2.0-dev sudo apt-get install ruby2.2-dev sudo apt-get install ruby2.3-dev or, generic way: sudo apt-get install ruby-dev or sudo apt-get install ruby`ruby -e ‘puts RUBY_VERSION[/\d+\.\d+/]’`-dev The first link you’ve posted is exactly your case: … Read more