本文介绍了如何在10.10优胜美地上安装therubyracer宝石?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
以下是日志:
<$> p $ p>
11:53 $ gem install libv8 -v'3.16.14.3' - --with-system-v8
构建原生扩展名为'' - -with-system-v8'
这可能需要一段时间...
已成功安装libv8-3.16.14.3
解析libv8-3.16.14.3的文档
安装ri文档libv8-3.16.14.3
在0秒后完成libv8的安装文档
1 gem installed
02:05 $ gem install therubyracer -v'0.12.1' - --with-system-v8
使用:'--with-system-v8'构建原生扩展
这可能需要一段时间...
错误:安装therubyracer时出错:
错误:无法构建gem原生扩展。
/usr/local/var/rbenv/versions/2.1.2/bin/ruby extconf.rb --with-system-v8
检查main()in -lpthread .. 。是
在-lobjc中检查main()...是
检查v8.h ...没有
*** extconf.rb失败***
可能由于某种原因不能创建Makefile,可能缺少必要的
库和/或头文件。检查mkmf.log文件以获取更多详细信息。您可能
需要配置选项。
提供的配置选项:
--with-opt-dir
--without-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 = / usr / local / var / rbenv / versions / 2.1.2 / bin / ruby
--with-pthreadlib
--without- pthreadlib
--with-objclib
--without-objclib
- 启用 - 调试
- 禁用 - 调试
--with-v8-dir
--without-v8-dir
--with-v8-include
--without-v8-include = $ {v8-dir} / include
--with-v8- lib
--without-v8-lib = $ {v8-dir} / lib
/usr/local/var/rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/ gems / libv8-3.16.14.3 / ext / libv8 / location.rb:50:在`configure'中:您选择使用系统中找到的V8版本(Libv8 :: Location :: System :: NotFoundError)
和* not *与libv8 rubygem绑定的那个。但是,
无法找到。请确保您有一个与安装的3.16.14.3兼容的
v8版本。如果
位置处于非标准
位置
谢谢,
Mgmt
可能需要使用特殊的--with-v8-dir选项$ / b / b来自/usr/local/var/rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/libv8-3.16.14.3/lib/libv8.rb:7:in`configure_makefile'
from extconf.rb:32:在``
extconf失败,退出代码1
Gem文件将保留安装在/ usr / local / var / rbenv中/versions/2.1.2/lib/ruby/gems/2.1.0/gems/therubyracer-0.12.1进行检查。
记录到/usr/local/var/rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/extensions/x86_64-darwin-14/2.1.0-static/therubyracer-0.12的结果。 1 / gem_make.out
解决方案
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.3-x86_64-darwin -12.gem#注意libv8版本可能会改变,所以通过pkg /中的文件选项卡,还记得使用指定版本的版本
然后只是捆绑你的项目宝石
这是它在10.10上工作的唯一方式(ruby 2.1.2)
I don't manage to install therubyracer gem on Yosemite 10.10.
Here is the log:
11:53 $ gem install libv8 -v '3.16.14.3' -- --with-system-v8 Building native extensions with: '--with-system-v8' This could take a while... Successfully installed libv8-3.16.14.3 Parsing documentation for libv8-3.16.14.3 Installing ri documentation for libv8-3.16.14.3 Done installing documentation for libv8 after 0 seconds 1 gem installed 02:05 $ gem install therubyracer -v '0.12.1' -- --with-system-v8 Building native extensions with: '--with-system-v8' This could take a while... ERROR: Error installing therubyracer: ERROR: Failed to build gem native extension. /usr/local/var/rbenv/versions/2.1.2/bin/ruby extconf.rb --with-system-v8 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 --without-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=/usr/local/var/rbenv/versions/2.1.2/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}/lib /usr/local/var/rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/libv8-3.16.14.3/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.3 installed. You may need to special --with-v8-dir options if it is in a non-standard location thanks, The Mgmt from /usr/local/var/rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/libv8-3.16.14.3/lib/libv8.rb:7:in `configure_makefile' from extconf.rb:32:in `' extconf failed, exit code 1 Gem files will remain installed in /usr/local/var/rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/therubyracer-0.12.1 for inspection. Results logged to /usr/local/var/rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/extensions/x86_64-darwin-14/2.1.0-static/therubyracer-0.12.1/gem_make.out
解决方案
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.3-x86_64-darwin-12.gem #note that libv8 version may change, so tab through files in pkg/, also remember to use the one with version specified
then just bundle your project gems
this is the only way it worked for me on 10.10 (ruby 2.1.2)
这篇关于如何在10.10优胜美地上安装therubyracer宝石?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!
09-06 15:35