Closed dinhtuan1991vt closed 8 years ago
@dinhtuan1991vt did you try to run gem install
with --with-opt-lib
flag?
How do you do that?
I got:
$ gem install therubyracer --with-opt-lib
ERROR: While executing gem ... (OptionParser::InvalidOption)
invalid option: --with-opt-lib
Also failing:
bundle config build.therubyracer --with-opt-lib
bundle install
Installing therubyracer 0.12.2 with native extensions
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
/Users/steven/.rvm/rubies/ruby-2.2.2/bin/ruby -r ./siteconf20151008-9512-l7noxv.rb extconf.rb --with-opt-lib
/Users/steven/.rvm/rubies/ruby-2.2.2/lib/ruby/2.2.0/mkmf.rb:1724:in `dir_config': undefined method `split' for true:TrueClass (NoMethodError)
from /Users/steven/.rvm/rubies/ruby-2.2.2/lib/ruby/2.2.0/mkmf.rb:2482:in `init_mkmf'
from /Users/steven/.rvm/rubies/ruby-2.2.2/lib/ruby/2.2.0/mkmf.rb:2525:in `<module:MakeMakefile>'
from /Users/steven/.rvm/rubies/ruby-2.2.2/lib/ruby/2.2.0/mkmf.rb:47:in `<top (required)>'
from /Users/steven/.rvm/rubies/ruby-2.2.2/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from /Users/steven/.rvm/rubies/ruby-2.2.2/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from extconf.rb:1:in `<main>'
extconf failed, exit code 1
Gem files will remain installed in /Users/steven/.rvm/gems/ruby-2.2.2/gems/therubyracer-0.12.2 for inspection.
Results logged to /Users/steven/.rvm/gems/ruby-2.2.2/extensions/x86_64-darwin-14/2.2.0/therubyracer-0.12.2/gem_make.out
An error occurred while installing therubyracer (0.12.2), and Bundler cannot continue.
I am having the same issue as @snoblenet when using --with-opt-lib
I'm having the same issue too
Has anyone been able to get by this? I'm having the same issue as well. Also tried passing the --with-system-v8
flag.
I'm having the same issue too, but that's helped me:
brew install v8
gem install libv8 -v '3.16.14.7' -- --with-system-v8
bundle install
@tab solution worked for me, thanks.
I am having the same issue and have spect quite a bit of time on it to no avail. Have an existing production application trying to get bundle set up on new computer from svn so changing gem versions is not preferable. Attempting to install -v 0.12.1
jeffreyrossi$ brew info v8 v8: stable 4.5.103.35 (bottled) Google's JavaScript engine https://code.google.com/p/v8/ /usr/local/Cellar/v8/4.5.103.35 (25 files, 29M) * Poured from bottle From: https://github.com/Homebrew/homebrew/blob/master/Library/Formula/v8.rb ==> Dependencies Optional: readline ✔ ==> Options --with-readline Use readline instead of libedit
have libv8 (3.16.14.7)
Installing therubyracer 0.12.1 with native extensions
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
/Users/jeffreyrossi/.rvm/rubies/ruby-1.9.3-p550/bin/ruby -r ./siteconf20151015-12444-30zla5.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/jeffreyrossi/.rvm/rubies/ruby-1.9.3-p550/bin/ruby --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}/ /Users/jeffreyrossi/.rvm/gems/ruby-1.9.3-p550@upgrade/gems/libv8-3.16.14.7/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.7 installed. You may need to special --with-v8-dir options if it is in a non-standard location
thanks, The Mgmt
from /Users/jeffreyrossi/.rvm/gems/ruby-1.9.3-p550@upgrade/gems/libv8-3.16.14.7/lib/libv8.rb:7:in `configure_makefile'
from extconf.rb:32:in `<main>'
extconf failed, exit code 1
Gem files will remain installed in /Users/jeffreyrossi/.rvm/gems/ruby-1.9.3-p550@upgrade/gems/therubyracer-0.12.1 for inspection.
Results logged to /Users/jeffreyrossi/.rvm/gems/ruby-1.9.3-p550@upgrade/extensions/x86_64-darwin-15/1.9.1/therubyracer-0.12.1/gem_make.out
An error occurred while installing therubyracer (0.12.1), and Bundler cannot continue.
Make sure that gem install therubyracer -v '0.12.1'
succeeds before bundling.
find_header: checking for v8.h... -------------------- no
"/usr/local/bin/gcc-4.9 -E -I/Users/jeffreyrossi/.rvm/rubies/ruby-1.9.3-p550/include/ruby-1.9.1/x86_64-darwin15.0.0 -I/Users/jeffreyrossi/.rvm/rubies/ruby-1.9.3-p550/include/ruby-1.9.1/ruby/backward -I/Users/jeffreyrossi/.rvm/rubies/ruby-1.9.3-p550/include/ruby-1.9.1 -I. -D_XOPEN_SOURCE -D_DARWIN_CSOURCE -I/usr/local/opt/libyaml/include -I/usr/local/opt/readline/include -I/usr/local/opt/libksba/include -I/usr/local/opt/openssl/include -Wall -g -rdynamic -O3 -ggdb -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-field-initializers -Wpointer-arith -Wwrite-strings -Wdeclaration-after-statement -Wimplicit-function-declaration -fno-common -pipe conftest.c -o conftest.i" gcc-4.9: error: unrecognized command line option '-rdynamic' checked program was: /* begin / 1: #include "ruby.h" 2: 3: #include <v8.h> /_ end */
v 0.11.x is no longer supported.
For those coming to this issue and using the latest version of therubyracer, please be sure you upgrade to the latest libv8
When I run bundle install, It show errors: