Sad, however, JSON-1.7.7 (and upto 1.8.1) is incompatible with Ruby-2.2.x. As you are using Ruby-2.2.1, it will not work for you.
There are 2 options for you:
- Update your
jsongem to1.8.2version. — Preferable - Edit
ruby-2.2.1/ext/json/fbuffer/fbuffer.hfile and replace problematic code withVALUE result = rb_str_new(FBUFFER_PTR(fb), FBUFFER_LEN(fb));. Look here for details