2013-02-15 13 views
12

Ciao ho ottenuto questo errore durante bundle install ...installazione therubyracer (0.10.1)

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

     /home/rajendran/.rvm/rubies/ruby-1.9.3-p374/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=/home/rajendran/.rvm/rubies/ruby-1.9.3-p374/bin/ruby 
extconf.rb:15:in `<main>': undefined method `include_path' for Libv8:Module (NoMethodError) 


Gem files will remain installed in /home/rajendran/.rvm/gems/ruby-1.9.3-p374/gems/therubyracer-0.10.1 for inspection. 
Results logged to /home/rajendran/.rvm/gems/ruby-1.9.3-p374/gems/therubyracer-0.10.1/ext/v8/gem_make.out 
An error occurred while installing therubyracer (0.10.1), and Bundler cannot continue. 
Make sure that `gem install therubyracer -v '0.10.1'` succeeds before bundling. 

come posso risolvere questo ..?
Nota: OS - Ubuntu 12.10

risposta

30

Si può provare come il seguente:

$ gem uninstall libv8 
$ gem install therubyracer 

E miniera rende il lavoro quando ho ottenuto l'errore.

P.S È necessario menzionare il sistema operativo

+0

Ha funzionato per me. Grazie –

+0

Puoi commentare la stringa 'trerubyracer' in Gemfile e fare installare bundle. –

4

Simile a @Sri, ma un po 'diversa, quindi incollarlo nel non dimenticarla: os - Xubuntu 12,10

  1. gem install therubyracer
  2. gemma disinstallazione libv8
  3. gemma di disinstallazione therubyracer
  4. gem install therubyracer -v '0.9.9' versione di questo gioiello è stato fondamentale ...
+0

ha funzionato anche su ubuntu 13.10. – thanikkal

1

sudo apt-get install g ++ ha fatto il lavoro ...

spero che sarà aiuta qualcuno

1

un'altra soluzione senza reinstallazione. (Nel caso in cui altre applicazioni Rails utilizzano una versione differente):

1.Elenco le versioni installate gemma:

$ gem list -l therubyracer  

*** LOCAL GEMS *** 
therubyracer (0.12.0) 

2.MODIFICA tua Gemfile di utilizzare una delle gemme installati:

# Gemfile 
gem 'therubyracer', '0.12.0', platforms: :ruby 

fatto. ora prova 'bundle install' ti darà una notifica di successo.

Problemi correlati