Error in installing json 1.8.0

70 views
Skip to first unread message

Ananyo Maiti

unread,
Apr 21, 2015, 11:21:42 PM4/21/15
to rubyonra...@googlegroups.com
Hi,
I am facing problem in installing the json 1.8.0 ruby gem due to which i
am unable to start my rails server.The error is shown below.


Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

/home/ananyo/.rvm/rubies/ruby-2.2.2/bin/ruby extconf.rb
creating Makefile

make "DESTDIR=" clean

make "DESTDIR="
compiling generator.c
In file included from generator.c:1:0:
../fbuffer/fbuffer.h: In function ‘fbuffer_to_s’:
../fbuffer/fbuffer.h:175:47: error: macro "rb_str_new" requires 2
arguments, but only 1 given
VALUE result = rb_str_new(FBUFFER_PAIR(fb));
^
../fbuffer/fbuffer.h:175:20: warning: initialization makes integer from
pointer without a cast [enabled by default]
VALUE result = rb_str_new(FBUFFER_PAIR(fb));
^
make: *** [generator.o] Error 1

make failed, exit code 2

Gem files will remain installed in
/home/ananyo/.rvm/gems/ruby-2.2.2/gems/json-1.8.0 for inspection.
Results logged to
/home/ananyo/.rvm/gems/ruby-2.2.2/extensions/x86_64-linux/2.2.0/json-1.8.0/gem_make.out
An error occurred while installing json (1.8.0), and Bundler cannot
continue.
Make sure that `gem install json -v '1.8.0'` succeeds before bundling.

How can i solve this problem?...

--
Posted via http://www.ruby-forum.com/.

Colin Law

unread,
Apr 22, 2015, 2:58:01 AM4/22/15
to rubyonra...@googlegroups.com
On 22 April 2015 at 04:20, Ananyo Maiti <li...@ruby-forum.com> wrote:
> VALUE result = rb_str_new(FBUFFER_PAIR(fb))


Googlin for that string led me to [1] which I think basically says
that json 1.8.0 is not compatible with ruby 2.2. I think the solution
is to use a later version of json or an earlier version of ruby.

Colin

[1] https://github.com/flori/json/issues/229

Robby O'Connor

unread,
Apr 22, 2015, 3:38:42 AM4/22/15
to rubyonra...@googlegroups.com, Colin Law
Not to be "that guy" but ALWAYS google your errors...If the whole error
doesn't work...try taking out everything unnncessary...such as paths...
Reply all
Reply to author
Forward
0 new messages