如何在jRuby中启用C扩展支持? [英] How to enable C extension support in jRuby?

查看:197
本文介绍了如何在jRuby中启用C扩展支持?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想安装一个gem,但我得到以下错误:

I want to install a gem but I get the following error:

Building native extensions.  This could take a while...
ERROR:  Error installing twitter-login:
        ERROR: Failed to build gem native extension.

        C:/nwcloud/jruby-1.7.2/bin/jruby.exe extconf.rb
NotImplementedError: C extension support is not enabled. Pass -Xcext.enabled=true to JRuby or set JRUBY_OPTS or modify .jrubyrc to enable.

我还阅读了这个问题有同样的问题,但我甚至不知道如何使用三个选项启用支持,因为我不知道如何通过 -Xcext.enabled = true 到JRuby或设置JRUBY_OPTS或修改.jrubyrc以启用。

I also read this question with the same problem, but I don't even know how to enable the support with the three options because I don't know how to pass -Xcext.enabled=true to JRuby or set JRUBY_OPTS or modify .jrubyrc to enable.

任何人都可以帮助我解决初学者问题?

Can anybody help me with my beginner problem?

推荐答案

。Rodrigo建议的jrubyrc edits不适用于我(jdk 7u25 / JRuby 1.7.4) JRUBY_OPTS确实做到了:

.jrubyrc edits suggested by Rodrigo didn't work for me (jdk 7u25 / JRuby 1.7.4), but exporting the JRUBY_OPTS did do the trick:

export JRUBY_OPTS="--1.9 -Xcext.enabled=true"

这篇关于如何在jRuby中启用C扩展支持?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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