首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >rails包安装错误therubyracer

rails包安装错误therubyracer
EN

Stack Overflow用户
提问于 2014-11-08 08:25:58
回答 4查看 191关注 0票数 0

我尝试单独安装gem和v8文件。我不知道该怎么做,因为我已经用尽了所有可能的选择

代码语言:javascript
运行
复制
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

/Users/giowong/.rbenv/versions/2.1.3/bin/ruby 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
--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=/Users/giowong/.rbenv/versions/2.1.3/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
/Users/giowong/rails_project/doctible_pre_treatment/vendor/bundle/ruby/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     /Users/giowong/rails_project/doctible_pre_treatment/vendor/bundle/ruby/2.1.0/gems/libv8-3.16.14.3/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/giowong/rails_project/doctible_pre_treatment/vendor/bundle/ruby/2.1.0/gems/therubyracer-0.12.1 for inspection.
Results logged to   /Users/giowong/rails_project/doctible_pre_treatment/vendor/bundle/ruby/2.1.0/extensions/x86_64-darwin-14/2.1.0-static/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.

我正在使用brew按照本安装指南安装ruby和rails。

https://gorails.com/setup/osx/10.10-yosemite

请帮帮忙,升级到Yosemite已经完全打乱了我的开发环境

EN

回答 4

Stack Overflow用户

发布于 2014-11-08 08:29:14

也许这个问题与XCode的最新更新有关。XCode更新后,您需要执行以下步骤:

打开Xcode并接受agreement

  • Reinstall
  1. 命令行工具的许可。

第二步似乎取决于你的操作系统版本。如果xcode-select --install不工作,请尝试在/System/Library/CoreServices中启动Install Command Line Developer Tools应用程序。

重新安装命令行工具后,尝试重新运行bundle install

票数 0
EN

Stack Overflow用户

发布于 2014-11-08 08:36:21

试试这个方法对我很有效:

gem install libv8 -- --with-system-v8

gem install therubyracer -v '0.12.1'

如果这不起作用,请尝试运行:

brew update

并再次尝试前两个步骤。

票数 0
EN

Stack Overflow用户

发布于 2015-03-17 21:05:55

我通过更改Gemfile解决了同样的问题

代码语言:javascript
运行
复制
gem 'therubyracer'

被替换为

代码语言:javascript
运行
复制
gem 'therubyracer', platforms: :ruby

你能试试这个吗?

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/26812293

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档