1

After upgrading to Mac OS El Capitan, I couldn't launch local Rails Server.

I've installed Homebrew, rbenv (with brew) and reinstalled rails 4.2.4 But it doesn't work.

1) 'rails s' returns that I must launch 'bundle install'

2) 'bundle install' returns : An error occurred while installing libv8 (3.16.14.7), and Bundler cannot continue. Make sure that gem install libv8 -v '3.16.14.7' succeeds before bundling.

3) Then sudo gem install libv8 -v '3.16.14.7' fails but I don't understand the block return message

Does someone have an idea of a solution ? I would be very thankful after 5 hours testing things :) Thankx in advance !

Here is the error message returned by sudo gem install libv8 -v '3.16.14.7'

ERROR:  Error installing libv8:
    ERROR: Failed to build gem native extension.

    /Users/bertrand/.rbenv/versions/2.2.3/bin/ruby -r ./siteconf20160824-67993-2n1zf8.rb extconf.rb
creating Makefile
Compiling v8 for x64
Using python 2.7.10
Using compiler: /usr/bin/c++ (clang version 7.3.0)
In file included from ../src/conversions.cc:32:
In file included from ../src/conversions-inl.h:43:
../src/scanner.h:444:5: error: unused typedef '__StaticAssertTypedef__444' [-Werror,-Wunused-local-typedef]
    STATIC_ASSERT(kCharacterLookaheadBufferSize == 1);
    ^
../src/checks.h:283:30: note: expanded from macro 'STATIC_ASSERT'
#define STATIC_ASSERT(test)  STATIC_CHECK(test)
                             ^
../src/checks.h:251:5: note: expanded from macro 'STATIC_CHECK'
    SEMI_STATIC_JOIN(__StaticAssertTypedef__, __LINE__)
    ^
../src/checks.h:240:32: note: expanded from macro 'SEMI_STATIC_JOIN'
#define SEMI_STATIC_JOIN(a, b) SEMI_STATIC_JOIN_HELPER(a, b)
                               ^
../src/checks.h:241:39: note: expanded from macro 'SEMI_STATIC_JOIN_HELPER'
#define SEMI_STATIC_JOIN_HELPER(a, b) a##b
                                      ^
<scratch space>:68:1: note: expanded from here
__StaticAssertTypedef__444
^
1 error generated.
make[1]: *** [/Users/bertrand/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/libv8-3.16.14.7/vendor/v8/out/x64.release/obj.target/preparser_lib/src/conversions.o] Error 1
make: *** [x64.release] Error 2
/Users/bertrand/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/libv8-3.16.14.7/ext/libv8/location.rb:36:in `block in verify_installation!': libv8 did not install properly, expected binary v8 archive '/Users/bertrand/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/libv8-3.16.14.7/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/bertrand/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/libv8-3.16.14.7/ext/libv8/location.rb:35:in `each'
    from /Users/bertrand/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/libv8-3.16.14.7/ext/libv8/location.rb:35:in `verify_installation!'
    from /Users/bertrand/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/libv8-3.16.14.7/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/bertrand/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/libv8-3.16.14.7/vendor/v8/out/x64.release/obj.target/preparser_lib/src/allocation.o
  CXX(target) /Users/bertrand/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/libv8-3.16.14.7/vendor/v8/out/x64.release/obj.target/preparser_lib/src/atomicops_internals_x86_gcc.o
  CXX(target) /Users/bertrand/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/libv8-3.16.14.7/vendor/v8/out/x64.release/obj.target/preparser_lib/src/bignum.o
  CXX(target) /Users/bertrand/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/libv8-3.16.14.7/vendor/v8/out/x64.release/obj.target/preparser_lib/src/bignum-dtoa.o
  CXX(target) /Users/bertrand/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/libv8-3.16.14.7/vendor/v8/out/x64.release/obj.target/preparser_lib/src/cached-powers.o
  CXX(target) /Users/bertrand/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/libv8-3.16.14.7/vendor/v8/out/x64.release/obj.target/preparser_lib/src/conversions.o

extconf failed, exit code 1
user3820585
  • 161
  • 1
  • 4
  • Can you post the error that you see when you tun `sudo gem install libv8 -v '3.16.14.7'`? This might be helplful: http://stackoverflow.com/questions/19673714/error-installing-libv8-error-failed-to-build-gem-native-extension – NM Pennypacker Aug 24 '16 at 15:36
  • Thank you for your help, I've added it to my message. I've already tried but it doesn't work, it's even worth because after that I have other warnings when 'rails s' like Ignoring json-1.8.1 because its extensions are not built. Try: gem pristine json --version 1.8.1 – user3820585 Aug 24 '16 at 15:48
  • This is a very common error. I think I normally solve it by doing a `bundle update therubyracer`. – Phil Aug 24 '16 at 18:09
  • Thank you Phil for your good advise, I did it, it installed libv8 3.16.14.15 instead of libv8 3.16.14.7. But I have 2 problems : 1) bundle update therubyracer fails later with installing pg 0.17.1 with native extensions 2) when I launch 'rails s' it's still trying to install libv8 3.16.14.7 Perhaps there's a conflict somewhere – user3820585 Aug 24 '16 at 19:06
  • I launched 'brew install postgresql' and then 'bundle install' worked ! But 'rails s' now returns : /Users/bertrand/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/bundler-1.12.5/lib/bundler/runtime.rb:35:in `block in setup': You have already activated rake 10.4.2, but your Gemfile requires rake 11.1.2. Prepending `bundle exec` to your command may solve this. (Gem::LoadError) Any idea please ? – user3820585 Aug 24 '16 at 21:02
  • 'bundle exec rails s' works ! But the message indicates there is a conflict, can anyone help me to solve it ? Otherwise I will have to prepending each rail instruction with 'bundle exec' – user3820585 Aug 24 '16 at 21:11

0 Answers0