Results 1 to 2 of 2

Thread: React-Rails 'Could not find json-1.8.1 in any of the sources'

  1. #1
    Join Date
    May 2007
    Location
    San Francisco, California
    Beans
    5,857
    Distro
    Ubuntu Development Release

    React-Rails 'Could not find json-1.8.1 in any of the sources'

    I'm doing a project using react-rails but when I run

    Code:
    bundle install
    I get

    Code:
    Could not find json-1.8.1 in any of the sources
    Specifically, this is the entire error

    Code:
    Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
    
        current directory: /Users/montana/.rvm/gems/ruby-2.3.0/gems/json-1.8.1/ext/json/ext/generator
    /Users/montana/.rvm/rubies/ruby-2.3.0/bin/ruby -r ./siteconf20160629-5602-i1di2t.rb extconf.rb
    creating Makefile
    
    current directory: /Users/montana/.rvm/gems/ruby-2.3.0/gems/json-1.8.1/ext/json/ext/generator
    make "DESTDIR=" clean
    
    current directory: /Users/montana/.rvm/gems/ruby-2.3.0/gems/json-1.8.1/ext/json/ext/generator
    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/montana/.rvm/rubies/ruby-2.3.0/include/ruby-2.3.0/ruby/intern.h:797: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)' (aka 'unsigned long (const char *, long)') [-Wint-conversion]
        VALUE result = rb_str_new(FBUFFER_PAIR(fb));
              ^        ~~~~~~~~~~
    1 warning and 1 error generated.
    make: *** [generator.o] Error 1
    There's been various posts about this on stackoverflow, and have tried most "solutions' but none seem to work for me, I also ran

    Code:
    gem list | grep json
    It says I have the json gem via

    Code:
     json (1.8.3)
     multi_json (1.10.1)
    I've tried to stop spring, updating the gems, & bundler. I've also ran

    Code:
    rbenv rehash
    To no avail, still getting this error, any input would be highly appreciated.

  2. #2
    Join Date
    May 2007
    Location
    San Francisco, California
    Beans
    5,857
    Distro
    Ubuntu Development Release

    Re: React-Rails 'Could not find json-1.8.1 in any of the sources'

    Solved by bumping down version of ruby/rails via running
    Code:
    rvm install ruby-2.1.1
    Then
    Code:
     rvm use ruby-2.1.1
    cd'd into directory and ran
    Code:
    bundle install
    It worked perfectly. This specifically is the Mac OSX fix, the Ubuntu (or any other distribution) to my knowledge is running
    Code:
    sudo apt-get install libgmp3-dev
    Refer to this for more info: https://github.com/flori/json/issues/229

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •