rubyjs / therubyracer

Embed the V8 Javascript Interpreter into Ruby
1.66k stars 191 forks source link

error installing with ruby 2.1 #360

Closed peddinti closed 9 years ago

peddinti commented 9 years ago

Hi i have upgraded to ruby 2.1 and now unable to install the rubyracer now .. i have installed the libv8 as follows gem install libv8 -- --with-v8-lib

./src/spaces.h:896:26: error: 'this' pointer cannot be null in well-defined C++ code; comparison may be assumed to always evaluate to true [-Werror,-Wtautological-undefined-compare] bool exists() { return this != NULL && coderange != NULL; } ^~ ~~ ../src/spaces.h:898:9: error: 'this' pointer cannot be null in well-defined C++ code; comparison may be assumed to always evaluate to false [-Werror,-Wtautological-undefined-compare] if (this == NULL || coderange == NULL) return false; ^~ ~~ 2 errors generated. make[1]: * [/Users/ViswaMani/.rvm/gems/ruby-2.1.1@futura/gems/libv8-3.16.14.11/vendor/v8/out/x64.release/obj.target/v8_base/src/accessors.o] Error 1 make: * [x64.release] Error 2 /Users/ViswaMani/.rvm/gems/ruby-2.1.1@futura/gems/libv8-3.16.14.11/ext/libv8/location.rb:36:in block in verify_installation!': libv8 did not install properly, expected binary v8 archive '/Users/ViswaMani/.rvm/gems/ruby-2.1.1@futura/gems/libv8-3.16.14.11/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/ViswaMani/.rvm/gems/ruby-2.1.1@futura/gems/libv8-3.16.14.11/ext/libv8/location.rb:35:ineach' from /Users/ViswaMani/.rvm/gems/ruby-2.1.1@futura/gems/libv8-3.16.14.11/ext/libv8/location.rb:35:in verify_installation!' from /Users/ViswaMani/.rvm/gems/ruby-2.1.1@futura/gems/libv8-3.16.14.11/ext/libv8/location.rb:26:ininstall!' from extconf.rb:7:in `

' GYP_GENERATORS=make \

cowboyd commented 9 years ago

Sorry you had trouble installing.

Usually this is a case of having a binary ruby for OSX that was not compiled locally, and so it is not properly matching with the binary gem.

Assuming you are on OSX Yosemite, Please take the following steps: