2013-07-11 266 views
-1

我花了几个小时,除了淘洗堆栈溢出,试图找到解决这个问题,但我一直没有能够解决任何事情时运行bundle install运行软件包安装时为什么会出现错误?

以下是错误消息:

Alexander-MacBook-Pro:HealthApp Alex$ bundle install 
Fetching gem metadata from https://rubygems.org/........ 
Fetching gem metadata from https://rubygems.org/.. 
Resolving dependencies...... 
Using rake (10.0.3) 
Using i18n (0.6.4) 
Using multi_json (1.6.1) 
Using activesupport (3.2.11) 
Using builder (3.0.4) 
Using activemodel (3.2.11) 
Using erubis (2.7.0) 
Using journey (1.0.4) 
Using rack (1.4.5) 
Using rack-cache (1.2) 
Using rack-test (0.6.2) 
Using hike (1.2.1) 
Using tilt (1.3.4) 
Using sprockets (2.2.2) 
Using actionpack (3.2.11) 
Using mime-types (1.21) 
Using polyglot (0.3.3) 
Using treetop (1.4.12) 
Using mail (2.4.4) 
Using actionmailer (3.2.11) 
Using arel (3.0.2) 
Using tzinfo (0.3.36) 
Using activerecord (3.2.11) 
Using activeresource (3.2.11) 
Using bcrypt-ruby (3.0.1) 
Using sass (3.2.6) 
Using bootstrap-sass (2.3.0.1) 
Using bundler (1.3.5) 
Using cancan (1.6.9) 
Using coffee-script-source (1.6.0) 
Using execjs (1.4.0) 
Using coffee-script (2.2.0) 
Using rack-ssl (1.3.3) 
Using json (1.7.7) 
Using rdoc (3.12.2) 
Using thor (0.17.0) 
Using railties (3.2.11) 
Using coffee-rails (3.2.2) 
Using commonjs (0.2.6) 
Using orm_adapter (0.4.0) 
Using warden (1.2.1) 
Using devise (2.2.3) 
Using sass-rails (3.2.6) 
Using font-awesome-sass-rails (3.0.2.2) 
Using haml (4.0.0) 
Using jquery-rails (2.2.1) 
Using jquery-ui-rails (3.0.1) 
Using kaminari (0.14.1) 
Using less (2.2.2) 
Using less-rails (2.2.6) 
Installing libv8 (3.11.8.13) 
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension. 

/Users/Alex/.rvm/rubies/jruby-1.7.4/bin/jruby extconf.rb 
NotImplementedError: C extension support is not enabled. Pass -Xcext.enabled=true to JRuby or set JRUBY_OPTS or modify .jrubyrc to enable. 

    (root) at /Users/Alex/.rvm/rubies/jruby-1.7.4/lib/ruby/shared/mkmf.rb:8 
    require at org/jruby/RubyKernel.java:1054 
    (root) at /Users/Alex/.rvm/rubies/jruby-1.7.4/lib/ruby/shared/rubygems/core_ext/kernel_require.rb:1 
    (root) at extconf.rb:1 


Gem files will remain installed in /Users/Alex/.rvm/gems/jruby-1.7.4/gems/libv8-3.11.8.13 for inspection. 
Results logged to /Users/Alex/.rvm/gems/jruby-1.7.4/gems/libv8-3.11.8.13/ext/libv8/gem_make.out 

An error occurred while installing libv8 (3.11.8.13), and Bundler cannot 
continue. 
Make sure that `gem install libv8 -v '3.11.8.13'` succeeds before bundling. 

运行gem install libv8 -v '3.11.8.13'并没有多大帮助。

+0

你在使用Jruby吗?与Ruby Ruby一起工作的一些宝石不能与Jruby一起工作,因为它们是本机C扩展。这意味着你必须找到替代的宝石来使用。某处有一个包含常见Jruby宝石替代品列表的页面。 我是一个超级初学者,可以自己琢磨红宝石并引导自己,所以我可能会说废话。 – Kage

+0

我也是一个超级noob,你能否提供给我一个链接到某处我可以找到这些Jruby宝石的替代品或什么? –

+0

嗯,我找到了我正在考虑的页面,但似乎没有帮助解决这个问题。 [C扩展替代品](https://github.com/jruby/jruby/wiki/C-Extension-Alternatives)。对不起,我无法进一步帮助你。 – Kage

回答

1

以下内容添加到您的~/.jrubyrc(创建它,如果它不存在):

cext.enabled=true 

然后再次运行bundle install命令。