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

Ruby Gem install Json fails on Mavericks and Xcode 5.1 – unknown argument: ‘-multiply_definedsuppress’

I am encountering the exact same problem after updating Xcode to 5.1 and news from Apple aren’t good. From Xcode 5.1 Release Notes: The Apple LLVM compiler in Xcode 5.1 treats unrecognized command-line options as errors. This issue has been seen when building both Python native extensions and Ruby Gems, where some invalid compiler options … Read more

How do I install CocoaPods?

POD Install Open terminal and type: sudo gem install cocoapods The Gem will get installed in Ruby inside the System library. Or try on Mac OS X v10.11 (El Capitan), type: sudo gem install -n /usr/local/bin cocoapods If there is an error “activesupport requires Ruby version >= 2.xx”, then install latest activesupport first by typing in the … Read more

Error installing mysql2: Failed to build gem native extension

On Ubuntu/Debian and other distributions using aptitude: sudo apt-get install libmysql-ruby libmysqlclient-dev Package libmysql-ruby has been phased out and replaced by ruby-mysql. This is where I found the solution. If the above command doesn’t work because libmysql-ruby cannot be found, the following should be sufficient: sudo apt-get install libmysqlclient-dev On Red Hat/CentOS and other distributions … Read more