Используя rbenv для среды Ruby 2.3.0 в OS X 10.11.1, я не могу установить therubyracer Gem при использовании 'bundle'.
Это успешно:
> gem install therubyracer
Building native extensions. This could take a while...
Successfully installed therubyracer-0.12.2
Parsing documentation for therubyracer-0.12.2
Done installing documentation for therubyracer after 0 seconds
1 gem installed
В моем Gemfile:
gem 'therubyracer', '0.12.2', platforms: :ruby
Это не удается:
> bundle
Installing therubyracer 0.12.2 (was 0.12.1) with native extensions
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
current directory: /Users/jsidlosky/code/sentons/websocket-rails-demo/.bundle/gems/therubyracer-0.12.2/ext/v8
/Users/jsidlosky/.rbenv/versions/2.3.0/bin/ruby -r ./siteconf20160215-9105-1s1s0pv.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.
....
To see why this extension failed to compile, please check the mkmf.log which can be found here:
/Users/jsidlosky/code/sentons/websocket-rails-demo/.bundle/extensions/x86_64-darwin-15/2.3.0-static/therubyracer-0.12.2/mkmf.log
Ошибка файла mkmf.log:
conftest.c:3:10: fatal error: 'v8.h' file not found
Некоторые вещи, которые я пробовал:
From: Как установить драгоценный камень therubyracer на 10.10 Yosemite?
git clone https://github.com/cowboyd/libv8.git
cd libv8
bundle install
bundle exec rake clean build binary
gem install pkg/libv8-3.16.14.13.gem
From: Установка пакета пытается использовать файл кеша
Добавление в ~/.bundle/config
BUNDLE_PATH: .bundle
BUNDLE_DISABLE_SHARED_GEMS: "1"
Я также пробовал это:
bundle config build.libv8 --with-system-v8
Я потратил более 5 часов, пробуя другие случайные идеи из различных вопросов StackOverflow и других сайтов. До сих пор ничего не дало мне работающий therubyracer внутри «bundle», хотя «gem install therubyracer» работает просто отлично.
Я буду очень признателен за любые указатели или решения.