2013-07-11 307 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命令。