为什么我不能为mac osx sierra捆绑安装json -v 1.8.3和其他宝石?

时间:2016-10-12 15:00:04

标签: ruby-on-rails ruby macos homebrew bundler

我最近升级到ruby 2.2.5和MAC OSX sierra。当我尝试bundle install时,我会遇到各种各样的宝石错误。以下是一些例子:

json gem

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

/Users/drubio/.rvm/rubies/ruby-2.2.5/bin/ruby -r ./siteconf20161012-33018-1t7a1pc.rb extconf.rb
 creating Makefile

make "DESTDIR=" clean

make "DESTDIR="
compiling debug_inspector.c
linking shared-object debug_inspector.bundle
ld: warning: directory not found for option '-L/Users/travis/.sm/pkg/active/lib'

make "DESTDIR=" install
make: /usr/local/bin/gmkdir: No such file or directory
make: *** [.RUBYARCHDIR.time] Error 1

make install failed, exit code 2

Gem files will remain installed in /Users/drubio/.rvm/gems/ruby-2.2.5@ohloh-ui/gems/debug_inspector-0.0.2 for inspection.
Results logged to /Users/drubio/.rvm/gems/ruby-2.2.5@ohloh-ui/extensions/x86_64-darwin-15/2.2.0-static/debug_inspector-0.0.2/gem_make.out

这是libv8 gem:

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

/Users/drubio/.rvm/rubies/ruby-2.2.5/bin/ruby -r ./siteconf20161012-33018-u9qwng.rb extconf.rb
creating Makefile
Compiling v8 for x64
Using python 2.7.12
Using compiler: /usr/bin/c++ (clang version 8.0.0)
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: file: /Users/drubio/.rvm/gems/ruby-2.2.5@ohloh-ui/gems/libv8-3.16.14.13/vendor/v8/out/x64.release/obj.target/preparser_lib/src/atomicops_internals_x86_gcc.o has no symbols
clang: warning: libstdc++ is deprecated; move to libc++ with a minimum deployment target of OS X 10.9
In file included from ../src/accessors.cc:28:
In file included from ../src/v8.h:60:
In file included from ../src/objects-inl.h:38:
In file included from ../src/elements.h:32:
../src/objects.h:5252:44: error: shifting a negative signed value is undefined [-Werror,-Wshift-negative-value]
  static const int kElementsKindMask = (-1 << kElementsKindShift) &
                                        ~~ ^
../src/objects.h:7386:36: error: shifting a negative signed value is undefined [-Werror,-Wshift-negative-value]
      (~kMaxCachedArrayIndexLength << kArrayIndexHashLengthShift) |
       ~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
2 errors generated.
make[1]: *** [/Users/drubio/.rvm/gems/ruby-2.2.5@ohloh-ui/gems/libv8-3.16.14.13/vendor/v8/out/x64.release/obj.target/v8_base/src/accessors.o] Error 1
make: *** [x64.release] Error 2
/Users/drubio/.rvm/gems/ruby-2.2.5@ohloh-ui/gems/libv8-3.16.14.13/ext/libv8/location.rb:36:in `block in verify_installation!': libv8 did not install properly, expected binary v8 archive '/Users/drubio/.rvm/gems/ruby-2.2.5@ohloh-ui/gems/libv8-3.16.14.13/vendor/v8/out/x64.release/obj.target/tools/gyp/libv8_base.a'to exist, but it was not found (Libv8::Location::Vendor::ArchiveNotFound)
    from /Users/drubio/.rvm/gems/ruby-2.2.5@ohloh-ui/gems/libv8-3.16.14.13/ext/libv8/location.rb:35:in `each'
    from /Users/drubio/.rvm/gems/ruby-2.2.5@ohloh-ui/gems/libv8-3.16.14.13/ext/libv8/location.rb:35:in `verify_installation!'
    from /Users/drubio/.rvm/gems/ruby-2.2.5@ohloh-ui/gems/libv8-3.16.14.13/ext/libv8/location.rb:26:in `install!'
    from extconf.rb:7:in `<main>'
GYP_GENERATORS=make \
    build/gyp/gyp --generator-output="out" build/all.gyp \
                  -Ibuild/standalone.gypi --depth=. \
                  -Dv8_target_arch=x64 \
                  -S.x64  -Dv8_enable_backtrace=1 -Dv8_can_use_vfp2_instructions=true -Darm_fpu=vfpv2 -Dv8_can_use_vfp3_instructions=true -Darm_fpu=vfpv3 -Dwerror=''
  CXX(target) /Users/drubio/.rvm/gems/ruby-2.2.5@ohloh-ui/gems/libv8-3.16.14.13/vendor/v8/out/x64.release/obj.target/preparser_lib/src/allocation.o
  CXX(target) /Users/drubio/.rvm/gems/ruby-2.2.5@ohloh-ui/gems/libv8-3.16.14.13/vendor/v8/out/x64.release/obj.target/preparser_lib/src/atomicops_internals_x86_gcc.o
  CXX(target) /Users/drubio/.rvm/gems/ruby-2.2.5@ohloh-ui/gems/libv8-3.16.14.13/vendor/v8/out/x64.release/obj.target/preparser_lib/src/bignum.o
  CXX(target) /Users/drubio/.rvm/gems/ruby-2.2.5@ohloh-ui/gems/libv8-3.16.14.13/vendor/v8/out/x64.release/obj.target/preparser_lib/src/bignum-dtoa.o
  CXX(target) /Users/drubio/.rvm/gems/ruby-2.2.5@ohloh-ui/gems/libv8-3.16.14.13/vendor/v8/out/x64.release/obj.target/preparser_lib/src/cached-powers.o
  CXX(target) /Users/drubio/.rvm/gems/ruby-2.2.5@ohloh-ui/gems/libv8-3.16.14.13/vendor/v8/out/x64.release/obj.target/preparser_lib/src/conversions.o
  CXX(target) /Users/drubio/.rvm/gems/ruby-2.2.5@ohloh-ui/gems/libv8-3.16.14.13/vendor/v8/out/x64.release/obj.target/preparser_lib/src/diy-fp.o
  CXX(target) /Users/drubio/.rvm/gems/ruby-2.2.5@ohloh-ui/gems/libv8-3.16.14.13/vendor/v8/out/x64.release/obj.target/preparser_lib/src/dtoa.o
  CXX(target) /Users/drubio/.rvm/gems/ruby-2.2.5@ohloh-ui/gems/libv8-3.16.14.13/vendor/v8/out/x64.release/obj.target/preparser_lib/src/fast-dtoa.o
  CXX(target) /Users/drubio/.rvm/gems/ruby-2.2.5@ohloh-ui/gems/libv8-3.16.14.13/vendor/v8/out/x64.release/obj.target/preparser_lib/src/fixed-dtoa.o
  CXX(target) /Users/drubio/.rvm/gems/ruby-2.2.5@ohloh-ui/gems/libv8-3.16.14.13/vendor/v8/out/x64.release/obj.target/preparser_lib/src/once.o
  CXX(target) /Users/drubio/.rvm/gems/ruby-2.2.5@ohloh-ui/gems/libv8-3.16.14.13/vendor/v8/out/x64.release/obj.target/preparser_lib/src/preparse-data.o
  CXX(target) /Users/drubio/.rvm/gems/ruby-2.2.5@ohloh-ui/gems/libv8-3.16.14.13/vendor/v8/out/x64.release/obj.target/preparser_lib/src/preparser.o
  CXX(target) /Users/drubio/.rvm/gems/ruby-2.2.5@ohloh-ui/gems/libv8-3.16.14.13/vendor/v8/out/x64.release/obj.target/preparser_lib/src/preparser-api.o
  CXX(target) /Users/drubio/.rvm/gems/ruby-2.2.5@ohloh-ui/gems/libv8-3.16.14.13/vendor/v8/out/x64.release/obj.target/preparser_lib/src/scanner.o
  CXX(target) /Users/drubio/.rvm/gems/ruby-2.2.5@ohloh-ui/gems/libv8-3.16.14.13/vendor/v8/out/x64.release/obj.target/preparser_lib/src/strtod.o
  CXX(target) /Users/drubio/.rvm/gems/ruby-2.2.5@ohloh-ui/gems/libv8-3.16.14.13/vendor/v8/out/x64.release/obj.target/preparser_lib/src/token.o
  CXX(target) /Users/drubio/.rvm/gems/ruby-2.2.5@ohloh-ui/gems/libv8-3.16.14.13/vendor/v8/out/x64.release/obj.target/preparser_lib/src/unicode.o
  CXX(target) /Users/drubio/.rvm/gems/ruby-2.2.5@ohloh-ui/gems/libv8-3.16.14.13/vendor/v8/out/x64.release/obj.target/preparser_lib/src/utils.o
  LIBTOOL-STATIC /Users/drubio/.rvm/gems/ruby-2.2.5@ohloh-ui/gems/libv8-3.16.14.13/vendor/v8/out/x64.release/libpreparser_lib.a
  CXX(target) /Users/drubio/.rvm/gems/ruby-2.2.5@ohloh-ui/gems/libv8-3.16.14.13/vendor/v8/out/x64.release/obj.target/preparser/preparser/preparser-process.o
  LINK(target) /Users/drubio/.rvm/gems/ruby-2.2.5@ohloh-ui/gems/libv8-3.16.14.13/vendor/v8/out/x64.release/preparser
  CXX(target) /Users/drubio/.rvm/gems/ruby-2.2.5@ohloh-ui/gems/libv8-3.16.14.13/vendor/v8/out/x64.release/obj.target/v8_base/src/accessors.o

extconf failed, exit code 1

Gem files will remain installed in /Users/drubio/.rvm/gems/ruby-2.2.5@ohloh-ui/gems/libv8-3.16.14.13 for inspection.
Results logged to /Users/drubio/.rvm/gems/ruby-2.2.5@ohloh-ui/extensions/x86_64-darwin-15/2.2.0-static/libv8-3.16.14.13/gem_make.out

这是蓝布宝石特别长的错误/警告:

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

    /Users/drubio/.rvm/rubies/ruby-2.2.5/bin/ruby -r ./siteconf20161012-33018-9auiyx.rb extconf.rb
checking for srand()... yes
checking for random()... yes
checking for bzero() in string.h,strings.h... yes
checking for strcasecmp()... yes
checking for strncasecmp()... yes
checking for mkdio.h... yes
checking for ruby/encoding.h... yes
creating extconf.h
creating Makefile

make "DESTDIR=" clean

make "DESTDIR="
compiling bluecloth.c
compiling Csio.c
compiling css.c
compiling docheader.c
compiling emmatch.c
emmatch.c:113:20: warning: using the result of an assignment as a condition without parentheses [-Wparentheses]
    case 2: if ( e = empair(f,first,last,match=2) )
                 ~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
emmatch.c:113:20: note: place parentheses around the assignment to silence this warning
    case 2: if ( e = empair(f,first,last,match=2) )
                   ^
                 (                               )
emmatch.c:113:20: note: use '==' to turn this assignment into an equality comparison
    case 2: if ( e = empair(f,first,last,match=2) )
                   ^
                   ==
1 warning generated.
compiling generate.c
generate.c:609:19: warning: using the result of an assignment as a condition without parentheses [-Wparentheses]
    else if ( tag = pseudo(ref->link) ) {
              ~~~~^~~~~~~~~~~~~~~~~~~
generate.c:609:19: note: place parentheses around the assignment to silence this warning
    else if ( tag = pseudo(ref->link) ) {
                  ^
              (                      )
generate.c:609:19: note: use '==' to turn this assignment into an equality comparison
    else if ( tag = pseudo(ref->link) ) {
                  ^
                  ==
generate.c:703:12: warning: using the result of an assignment as a condition without parentheses [-Wparentheses]
                if ( ref = bsearch(&key, T(*f->footnotes), S(*f->footnotes),
                     ~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
generate.c:703:12: note: place parentheses around the assignment to silence this warning
                if ( ref = bsearch(&key, T(*f->footnotes), S(*f->footnotes),
                         ^
generate.c:703:12: note: use '==' to turn this assignment into an equality comparison
                if ( ref = bsearch(&key, T(*f->footnotes), S(*f->footnotes),
                         ^
                         ==
2 warnings generated.
compiling html5.c
compiling markdown.c
markdown.c:184:11: warning: using the result of an assignment as a condition without parentheses [-Wparentheses]
        if ( end = strstr(T(t->text), "-->") ) {
             ~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
markdown.c:184:11: note: place parentheses around the assignment to silence this warning
        if ( end = strstr(T(t->text), "-->") ) {
                 ^
             (                              )
markdown.c:184:11: note: use '==' to turn this assignment into an equality comparison
        if ( end = strstr(T(t->text), "-->") ) {
                 ^
                 ==
markdown.c:232:16: warning: using the result of an assignment as a condition without parentheses [-Wparentheses]
                if ( closing = (c == '/') ) c = flogetc(&f);
                     ~~~~~~~~^~~~~~~~~~~~
markdown.c:232:16: note: place parentheses around the assignment to silence this warning
                if ( closing = (c == '/') ) c = flogetc(&f);
                             ^
                     (                   )
markdown.c:232:16: note: use '==' to turn this assignment into an equality comparison
                if ( closing = (c == '/') ) c = flogetc(&f);
                             ^
                             ==
markdown.c:475:8: warning: using the result of an assignment as a condition without parentheses [-Wparentheses]
        if ( x=is_extra_dt(t->next, clip) )
             ~^~~~~~~~~~~~~~~~~~~~~~~~~~~
markdown.c:475:8: note: place parentheses around the assignment to silence this warning
        if ( x=is_extra_dt(t->next, clip) )
              ^
             (                           )
markdown.c:475:8: note: use '==' to turn this assignment into an equality comparison
        if ( x=is_extra_dt(t->next, clip) )
              ^
              ==
markdown.c:489:14: warning: using the result of an assignment as a condition without parentheses [-Wparentheses]
    if ( ret = is_discount_dt(t,clip) )
         ~~~~^~~~~~~~~~~~~~~~~~~~~~~~
markdown.c:489:14: note: place parentheses around the assignment to silence this warning
    if ( ret = is_discount_dt(t,clip) )
             ^
         (                           )
markdown.c:489:14: note: use '==' to turn this assignment into an equality comparison
    if ( ret = is_discount_dt(t,clip) )
             ^
             ==
markdown.c:763:16: warning: using the result of an assignment as a condition without parentheses [-Wparentheses]
        if ( p->ident = malloc(4+strlen(prefix)+S(q->text)) )
             ~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
markdown.c:763:16: note: place parentheses around the assignment to silence this warning
        if ( p->ident = malloc(4+strlen(prefix)+S(q->text)) )
                      ^
             (                                             )
markdown.c:763:16: note: use '==' to turn this assignment into an equality comparison
        if ( p->ident = malloc(4+strlen(prefix)+S(q->text)) )
                      ^
                      ==
markdown.c:928:12: warning: using the result of an assignment as a condition without parentheses [-Wparentheses]
        if ( para = (q != text) ) {
             ~~~~~^~~~~~~~~~~~~
markdown.c:928:12: note: place parentheses around the assignment to silence this warning
        if ( para = (q != text) ) {
                  ^
             (                 )
markdown.c:928:12: note: use '==' to turn this assignment into an equality comparison
        if ( para = (q != text) ) {
                  ^
                  ==
6 warnings generated.
compiling mkdio.c
mkdio.c:272:14: warning: using the result of an assignment as a condition without parentheses [-Wparentheses]
    if ( len = S(f.out) ) {
         ~~~~^~~~~~~~~~
mkdio.c:272:14: note: place parentheses around the assignment to silence this warning
    if ( len = S(f.out) ) {
             ^
         (             )
mkdio.c:272:14: note: use '==' to turn this assignment into an equality comparison
    if ( len = S(f.out) ) {
             ^
             ==
1 warning generated.
compiling resource.c
compiling setup.c
compiling tags.c
compiling version.c
compiling xml.c
xml.c:49:14: warning: using the result of an assignment as a condition without parentheses [-Wparentheses]
        if ( entity = mkd_xmlchar(c) )
             ~~~~~~~^~~~~~~~~~~~~~~~
xml.c:49:14: note: place parentheses around the assignment to silence this warning
        if ( entity = mkd_xmlchar(c) )
                    ^
             (                      )
xml.c:49:14: note: use '==' to turn this assignment into an equality comparison
        if ( entity = mkd_xmlchar(c) )
                    ^
                    ==
xml.c:72:14: warning: using the result of an assignment as a condition without parentheses [-Wparentheses]
        if ( entity = mkd_xmlchar(c) )
             ~~~~~~~^~~~~~~~~~~~~~~~
xml.c:72:14: note: place parentheses around the assignment to silence this warning
        if ( entity = mkd_xmlchar(c) )
                    ^
             (                      )
xml.c:72:14: note: use '==' to turn this assignment into an equality comparison
        if ( entity = mkd_xmlchar(c) )
                    ^
                    ==
2 warnings generated.
compiling xmlpage.c
xmlpage.c:33:13: warning: using the result of an assignment as a condition without parentheses [-Wparentheses]
        if ( title = mkd_doc_title(p) )
             ~~~~~~^~~~~~~~~~~~~~~~~~
xmlpage.c:33:13: note: place parentheses around the assignment to silence this warning
        if ( title = mkd_doc_title(p) )
                   ^
             (                       )
xmlpage.c:33:13: note: use '==' to turn this assignment into an equality comparison
        if ( title = mkd_doc_title(p) )
                   ^
                   ==
1 warning generated.
linking shared-object bluecloth_ext.bundle
ld: warning: directory not found for option '-L/Users/travis/.sm/pkg/active/lib'

make "DESTDIR=" install
make: /usr/local/bin/gmkdir: No such file or directory
make: *** [.RUBYARCHDIR.time] Error 1

make install failed, exit code 2

Gem files will remain installed in /Users/drubio/.rvm/gems/ruby-2.2.5@ohloh-ui/gems/bluecloth-2.2.0 for inspection.
Results logged to /Users/drubio/.rvm/gems/ruby-2.2.5@ohloh-ui/extensions/x86_64-darwin-15/2.2.0-static/bluecloth-2.2.0/gem_make.out

我对上述各种宝石有更多错误。我试图在堆栈溢出和一些问题上调查此问题,我发现的唯一事情是更新/升级brew并将我的xcode版本从7.3更新到8.0。我已经完成了这两个升级,错误仍然存​​在。现在我不知道该怎么做。对于低于2.2.5的ruby版本,一切正常,但当我尝试cap deploy作为我部署的环境使用ruby 2.2.5时会出现问题。有没有人对可能出错的地方有任何想法?

1 个答案:

答案 0 :(得分:0)

似乎我的问题的答案是安装最新版本的bundler。

Bundler