![](/img/trans.png)
[英]How to enable colors with rspec when using JRuby or bundle exec?
[英]How to enable C extension support in jRuby?
我想安装一个gem,但是我收到以下错误:
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启用。
任何人都可以帮我解决我的初学者问题吗?
罗德里戈建议的.jrubyrc编辑对我不起作用(jdk 7u25 / JRuby 1.7.4),但导出JRUBY_OPTS确实可以解决问题:
export JRUBY_OPTS="--1.9 -Xcext.enabled=true"
确保您使用的是最新的openjdk(撰写本文时为7更新21)和最新的JRuby(1.7.4)。
在用户主文件夹中创建名为.jrubyrc的文件。
添加以下内容;
cext.enabled=true
DONE
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.