title: How to install json gem - Failed to build gem native extension(mac 10.10)
body: <p><em>OS: Mac OS X 10.10.3 XCode: Latest with command line tools installed (version 6.3) Rails: version 4.2.1 Ruby: version 2.2.1</em></p>
  
  <p>I was trying to generate the routes for a project I am working on (been doing that on regular basis), when I got an error message, with a recommendation that I do bundle install and bundle exec. I did, and this time around, the process broke off while compiling the JSON Gem (version 1.7.7).</p>
  
  <p>Doing some research on StackOverflow, the recommendation was to update the Xcode's command line tools, and I did, but that did not solve the problem.</p>
  
  <p>I tried installing the JSON version 1.7.7 separately, and it failed, telling me to look for the error log in:</p>
  
  <pre><code>/Users/zwb/.rvm/rubies/ruby-2.2.1/bin/ruby -r ./siteconf20150411-36070-1t083xl.rb extconf.rb
  creating Makefile
  
  make "DESTDIR=" clean
  
  make "DESTDIR="
  compiling generator.c
  In file included from generator.c:1:
  ./../fbuffer/fbuffer.h:175:47: error: too few arguments provided to function-like macro invocation
      VALUE result = rb_str_new(FBUFFER_PAIR(fb));
                                                ^
  /Users/zwb/.rvm/rubies/ruby-2.2.1/include/ruby-2.2.0/ruby/intern.h:793:9: note: macro 'rb_str_new' defined here
  #define rb_str_new(str, len) __extension__ (    \
          ^
  In file included from generator.c:1:
  ./../fbuffer/fbuffer.h:175:11: warning: incompatible pointer to integer conversion initializing 'VALUE' (aka 'unsigned long') with an expression of type 'VALUE (const char *, long)' [-Wint-conversion]
      VALUE result = rb_str_new(FBUFFER_PAIR(fb));
            ^        ~~~~~~~~~~
  1 warning and 1 error generated.
  make: *** [generator.o] Error 1
  
  make failed, exit code 2
  </code></pre>