I am running Mac OSX 10.9.1 and I am using RVM to manage Ruby v2.0.0-p353.
When I try to install Rails I get this error:
Ryans-MacBook-Air-2:~ ryan$
I was having the same problem and remembered seeing something in my Terminal output that said XCode developer tools was out of date or not installed (I can't remember which). It suggested running:
$ xcode-select --install
After doing so, I was still getting the problem. I tried removing the cache for the gemset (I'm using RVM) but still was getting the error. I was still on ruby-2.0.0-p353. I did the following and things are working for me:
$ rvm get stable
$ rvm reload
$ rvm install 2.1
$ rvm gemset create your_gemset_name
# Updated my .ruby-version and .ruby-gemset files in my Rails app to use the new gemset
$ cd /to/my/rails/app
# You can run $ rvm list gemsets to make sure your app is now using the new gemset. It will point to the current one being used.
$ bundle install
With a new version of Ruby and a new gemset things work fine. Not sure what happened with the other gemset, but I noticed it first when I tried to add the sidekiq gem and ran $ bundle install.
I wonder if it had something to do with a recent XCode update though since I was asked about the developer tools.