-1

我花了过去几个小时,除了搜索 Stack Overflow 之外,试图找到解决这个问题的方法,但是在运行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'没有多大帮助。

4

1 回答 1

1

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

cext.enabled=true

然后再次运行该bundle install命令。

于 2013-07-11T02:41:29.247 回答