Skip to content

Installing therubyracer on Mac OS and Ruby 2.3.0 #266

Closed
@justin808

Description

@justin808

If you have the below problem, the solution that worked for me on April 3, 2016 can be found here:

http://stackoverflow.com/a/36388150/1009332

brew tap homebrew/versions
brew install v8-315

gem install libv8 -v '3.16.14.13' -- --with-system-v8
gem install therubyracer -- --with-v8-dir=/usr/local/opt/v8-315

bundle install

Errors that this fixes:

Installing therubyracer 0.12.2 with native extensions

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

    current directory: /Users/justin/.rvm/gems/ruby-2.3.0/gems/therubyracer-0.12.2/ext/v8
/Users/justin/.rvm/rubies/ruby-2.3.0/bin/ruby -r ./siteconf20160403-74333-17ute6e.rb extconf.rb
checking for main() in -lpthread... yes
checking for main() in -lobjc... yes
checking for v8.h... no
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers.  Check the mkmf.log file for more details.  You may
need configuration options.

Provided configuration options:
    --with-opt-dir
    --with-opt-include
    --without-opt-include=${opt-dir}/include
    --with-opt-lib
    --without-opt-lib=${opt-dir}/lib
    --with-make-prog
    --without-make-prog
    --srcdir=.
    --curdir
    --ruby=/Users/justin/.rvm/rubies/ruby-2.3.0/bin/$(RUBY_BASE_NAME)
    --with-pthreadlib
    --without-pthreadlib
    --with-objclib
    --without-objclib
    --enable-debug
    --disable-debug
    --with-v8-dir
    --without-v8-dir
    --with-v8-include
    --without-v8-include=${v8-dir}/include
    --with-v8-lib
    --without-v8-lib=${v8-dir}/lib
/Users/justin/.rvm/gems/ruby-2.3.0/gems/libv8-3.16.14.13/ext/libv8/location.rb:50:in `configure': You have chosen to use the version of V8 found on your system (Libv8::Location::System::NotFoundError)
and *not* the one that is bundle with the libv8 rubygem. However,
it could not be located. please make sure you have a version of
v8 that is compatible with 3.16.14.13 installed. You may
need to special --with-v8-dir options if it is in a non-standard
location

thanks,
The Mgmt

    from /Users/justin/.rvm/gems/ruby-2.3.0/gems/libv8-3.16.14.13/lib/libv8.rb:7:in `configure_makefile'
    from extconf.rb:32:in `<main>'

To see why this extension failed to compile, please check the mkmf.log which can be found here:

  /Users/justin/.rvm/gems/ruby-2.3.0/extensions/x86_64-darwin-15/2.3.0/therubyracer-0.12.2/mkmf.log

extconf failed, exit code 1

Gem files will remain installed in /Users/justin/.rvm/gems/ruby-2.3.0/gems/therubyracer-0.12.2 for inspection.
Results logged to /Users/justin/.rvm/gems/ruby-2.3.0/extensions/x86_64-darwin-15/2.3.0/therubyracer-0.12.2/gem_make.out

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions