2012-01-27 85 views
12

我在gem文件中添加了gem'sunspot_rails'並運行了bundle install。我已經越來越錯誤在安裝libv8和錯誤信息如下:安裝libv8(3.3.10.4)在rails上的錯誤(在Lion上運行)

Installing libv8 (3.3.10.4) with native extensions 
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension. 

     /opt/local/bin/ruby extconf.rb 
*** extconf.rb failed *** 
Could not create Makefile due to some reason, probably lack of 
necessary libraries and/or headers. Check the mkmf.log file for more 
details. You may need configuration options. 

Provided configuration options: 
    --with-opt-dir 
    --with-opt-include 
    --without-opt-include=${opt-dir}/include 
    --with-opt-lib 
    --without-opt-lib=${opt-dir}/lib 
    --with-make-prog 
    --without-make-prog 
    --srcdir=. 
    --curdir 
    --ruby=/opt/local/bin/ruby 
extconf.rb:13: uninitialized constant Gem (NameError) 
Checking for Python... 

Gem files will remain installed in /Users/sonyakim/.rvm/gems/ruby-1.9.2-p290/gems/libv8-3.3.10.4 for inspection. 
Results logged to /Users/sonyakim/.rvm/gems/ruby-1.9.2-p290/gems/libv8-3.3.10.4/ext/libv8/gem_make.out 
An error occured while installing libv8 (3.3.10.4), and Bundler cannot continue. 
Make sure that `gem install libv8 -v '3.3.10.4'` succeeds before bundling. 

當我運行創業板安裝libv8 -v「3.3.10.4」,打印以下錯誤信息:

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

     /opt/local/bin/ruby extconf.rb 
*** extconf.rb failed *** 
Could not create Makefile due to some reason, probably lack of 
necessary libraries and/or headers. Check the mkmf.log file for more 
details. You may need configuration options. 

Provided configuration options: 
    --with-opt-dir 
    --with-opt-include 
    --without-opt-include=${opt-dir}/include 
    --with-opt-lib 
    --without-opt-lib=${opt-dir}/lib 
    --with-make-prog 
    --without-make-prog 
    --srcdir=. 
    --curdir 
    --ruby=/opt/local/bin/ruby 
extconf.rb:13: uninitialized constant Gem (NameError) 
Checking for Python... 

Gem files will remain installed in /Users/sonyakim/.rvm/gems/ruby-1.9.2-p290/gems/libv8-3.3.10.4 for inspection. 
Results logged to /Users/sonyakim/.rvm/gems/ruby-1.9.2-p290/gems/libv8-3.3.10.4/ext/libv8/gem_make.out 

如何正確安裝libv8?

+0

您正在使用什麼版本的'gem'的? 'gem -v' – tadman 2012-01-27 15:56:51

+0

即時通訊使用版本1.8.15 – user1173832 2012-01-27 16:15:13

回答