I've been working through the Rails install instructions (http://railsapps.github.io/installrubyonrails-mac.html) and everything was okay up until I got to gem install rails
part under New Rails Application. When I ran that I got libxml2 is missing. Here's the log: http://codecascade.com/sIjhQ/raw
I had similar issues install nokogiri, and the only way I was able to get it resolved was with
gem install nokogiri -- --use-system-libraries
I'm on OS X 10.10.2. I also have RubyMine installed if that's potentially relevant.