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

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

问题描述

我希望在获得 gem install therubyracer 的帮助。这是错误:

  $ gem install therubyracer 
构建本机扩展。这可能需要一段时间...
错误:安装therubyracer时出错:
错误:无法构建gem原生扩展。

/Users/david/.rvm/rubies/ruby-1.9.3-p194/bin/ruby extconf.rb
在-lobjc中检查main()...是
*** extconf.rb失败***
由于某些原因无法创建Makefile,可能缺少
必需的库和/或头文件。查看mkmf.log文件以获取更多
的详细信息。您可能需要配置选项。

提供的配置选项:
--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:在< main>中:未定义的方法include_path用于Libv8:Module(NoMethodError)

以下是我在出错前执行的一些显着步骤。他们工作得很好:

  $ 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(通过自制软件)


解决方案

b
$ b

  $ gem uninstall libv8 
$ gem install therubyracer

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

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

My environment is:

  • Mac OS X Lion 10.7.4
  • ruby 1.9.3p194 (2012-04-20 revision 35410) [x86_64-darwin11.4.0] (via rvm)
  • V8 version 3.9.24 (via homebrew)

解决方案

This worked for me:

$ gem uninstall libv8
$ gem install therubyracer

(A big thanks to http://www.ruby-forum.com/topic/4306127)

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

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