`gem install therubyracer` 在 Mac OS X Lion 上失败 [英] `gem install therubyracer` fails on Mac OS X Lion

查看:21
本文介绍了`gem install therubyracer` 在 Mac OS X Lion 上失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果您能帮助我使 gem install therubyracer 工作,我将不胜感激.这是错误:

I would appreciate some help in getting gem install therubyracer to work. Here is the error:

$ gem install therubyracer
Building native extensions.  This could take a while...
ERROR:  Error installing therubyracer:
    ERROR: Failed to build gem native extension.

        /Users/david/.rvm/rubies/ruby-1.9.3-p194/bin/ruby extconf.rb
checking for main() in -lobjc... yes
*** 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/david/.rvm/rubies/ruby-1.9.3-p194/bin/ruby
    --with-objclib
    --without-objclib
extconf.rb:15:in `<main>': undefined method `include_path' for Libv8:Module (NoMethodError)

以下是我在出现错误之前运行的一些值得注意的步骤.他们工作得很好:

Here are some notable steps that I ran before the error. They worked fine:

$ gem install libv8
$ brew install v8

我的环境是:

  • Mac OS X Lion 10.7.4
  • ruby 1.9.3p194(2012-04-20 修订版 35410)[x86_64-darwin11.4.0](通过 rvm)
  • V8 版本 3.9.24(通过自制软件)

推荐答案

这对我有用:

$ gem uninstall libv8
$ gem install therubyracer

(非常感谢 http://www.ruby-forum.com/topic/4306127)

这篇关于`gem install therubyracer` 在 Mac OS X Lion 上失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆