Title: Issue installing gem 'eventmachine' while Migrating to Ruby 2.2.0 (specifically on OSX 10.10.1 Yosemite and XCode 6.1.1)

On my MAC, having OSX 10.10.1 Yosemite and XCode 6.1.1 (a recent upgrade), I faced couple of critical problems while migrating one of our app to latest Ruby 2.2.0

The bundler would scream for gem "eventmachine" version 1.0.3 or 1.0.4 installation. Errors such as these would terminate/halt bundler to carry out gems installation process on local

  • Failed to build gem native extension.
  • Could not create Makefile due to some reason, probably lack of necessary
    libraries and/or headers

After trying many solutions and inputs recommended on several SO and GIT posts, I stumbled upon this solution to install developer tools which successfully let bundler install gem 'eventmachine v1.0.4' for Ruby 2.2.0

Download and install developer tools for XCode 6.1.1 from the following Apple link
[Click here to go to Apple developer tools download page][1]

Direct link - https://developer.apple.com/downloads/index.action
File name - commandlinetoolsosx10.10forxcode6.1.1

Well, I had developer tools installed earlier with my old OSX and XCode, but after upgrading to Yosemite and XCode 6.1.1. it seems that I have to download "developer tools" again for latest versions and install on local a fresh.

Please share or post if you have found alternate ways i.e. without installing "developer tools" to resolve this issue with Ruby 2.2.0 upgrade on OSX 10.10.1 Yosemite and XCode 6.1.1

I also faced issues starting sunspot solr after upgrading to Ruby 2.2.0
Error was - Library not loaded: @@HOMEBREW_PREFIX@@/opt/readline/lib/libreadline.6.dylib (LoadError)
Following fixed those issues on my local.
brew rm -f readline
brew install readline
brew link readline --force
[1]: https://developer.apple.com/downloads/index.action