2013-10-28 15 views
7

Sto provando a eseguire un'applicazione in locale, ma quando lo faccio mi viene generato questo errore.Impossibile installare Debugger gem - Rails - Mac OSX Mavericks

Patricks-MacBook-Air:niet pbj$ rails s 
Could not find debugger-1.6.1 in any of the sources 
Run `bundle install` to install missing gems. 

Quando eseguo 'bundle install' ottengo questo:

Fetching source index from https://rubygems.org/ 
Enter your password to install the bundled RubyGems to your system: 
Using rake (10.1.0) 
Using i18n (0.6.5) 
Using minitest (4.7.5) 
Using multi_json (1.8.0) 
Using atomic (1.1.13) 
Using thread_safe (0.1.3) 
Using tzinfo (0.3.37) 
Using activesupport (4.0.0) 
Using builder (3.1.4) 
Using erubis (2.7.0) 
Using rack (1.5.2) 
Using rack-test (0.6.2) 
Using actionpack (4.0.0) 
Using mime-types (1.25) 
Using polyglot (0.3.3) 
Using treetop (1.4.15) 
Using mail (2.5.4) 
Using actionmailer (4.0.0) 
Using activemodel (4.0.0) 
Using activerecord-deprecated_finders (1.0.3) 
Using arel (4.0.0) 
Using activerecord (4.0.0) 
Using addressable (2.3.5) 
Using json (1.8.0) 
Using mini_portile (0.5.1) 
Using nokogiri (1.6.0) 
Using uuidtools (2.1.4) 
Using aws-sdk (1.11.1) 
Using bcrypt-ruby (3.1.1) 
Using coderay (1.0.9) 
Using better_errors (0.9.0) 
Using debug_inspector (0.0.2) 
Using binding_of_caller (0.7.2) 
Using sass (3.2.10) 
Using thor (0.18.1) 
Using bourbon (3.1.8) 
Using callsite (0.0.11) 
Using cancan (1.6.10) from https://github.com/ricec/cancan.git (at master) 
Using xpath (2.0.0) 
Using capybara (2.1.0) 
Using climate_control (0.0.3) 
Using cocaine (0.5.1) 
Using columnize (0.3.6) 
Using database_cleaner (1.1.1) 
Using debugger-linecache (1.2.0) 
Using debugger-ruby_core_source (1.2.3) 
Installing debugger (1.6.1) 
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension. 

    /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby extconf.rb 
checking for rb_method_entry_t.called_id in method.h... no 
checking for rb_control_frame_t.method_id in method.h... no 
checking for rb_method_entry_t.called_id in method.h... no 
checking for rb_control_frame_t.method_id in method.h... no 
checking for rb_method_entry_t.called_id in method.h... yes 
checking for vm_core.h... yes 
checking for iseq.h... no 
Makefile creation failed 
************************************************************* 

    NOTE: If your headers were not found, try passing 
     --with-ruby-include=PATH_TO_HEADERS  

************************************************************* 

*** 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 
    --without-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=/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby 
    --with-ruby-dir 
    --without-ruby-dir 
    --with-ruby-include 
    --without-ruby-include=${ruby-dir}/include 
    --with-ruby-lib 
    --without-ruby-lib=${ruby-dir}/ 


Gem files will remain installed in /Users/pbj/.bundler/tmp/39109/gems/debugger-1.6.1 for inspection. 
Results logged to /Users/pbj/.bundler/tmp/39109/gems/debugger-1.6.1/ext/ruby_debug/gem_make.out 

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

Dopo che cerco ed installare la gemma debugger e ottenere questo errore

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

    /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby extconf.rb 
checking for rb_method_entry_t.called_id in method.h... no 
checking for rb_control_frame_t.method_id in method.h... no 
checking for rb_method_entry_t.called_id in method.h... no 
checking for rb_control_frame_t.method_id in method.h... no 
checking for rb_method_entry_t.called_id in method.h... yes 
checking for vm_core.h... yes 
checking for iseq.h... no 
Makefile creation failed 
************************************************************* 

    NOTE: If your headers were not found, try passing 
     --with-ruby-include=PATH_TO_HEADERS  

************************************************************* 

*** 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 
    --without-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=/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby 
    --with-ruby-dir 
    --without-ruby-dir 
    --with-ruby-include 
    --without-ruby-include=${ruby-dir}/include 
    --with-ruby-lib 
    --without-ruby-lib=${ruby-dir}/ 


Gem files will remain installed in /Library/Ruby/Gems/2.0.0/gems/debugger-1.6.2 for inspection. 
Results logged to /Library/Ruby/Gems/2.0.0/gems/debugger-1.6.2/ext/ruby_debug/gem_make.out 

A questo punto ho assolutamente nessun indizio su come risolvere il problema.

+0

tenta di aggiungere gioiello 'debugger' nel vostro Gemfile – LHH

+0

Come potrei fare per fare questo? Scusa, ma sono così nuovo a questa cosa. – patrick

+0

Mostra il tuo Gemfile – LHH

risposta

3

assicurati di avere la versione rubino corretta "ruby -v" o se stai usando rvm assicurati di passare alla versione corretta "rvm use 2.0". Altrimenti, inserisci più informazioni sulle versioni correnti di ruby ​​e rails e stai usando rvm o system ruby, ecc.

0

Le intestazioni di default di ruby2.0 di Mavericks sono fuori posto. Prova a installare il tuo ruby, manualmente o tramite un gestore delle versioni come rbenv, e prova a eseguirlo di nuovo.


È possibile verificare eseguendo

which ruby 

Se l'uscita è

/usr/bin/ruby 

allora è probabilmente utilizzando il sistema di rubino

6

Questo è problema XCode 5.1 di. Basta provare quanto segue:

ARCHFLAGS=-Wno-error=unused-command-line-argument-hard-error-in-future gem install GEMNAME 

Quindi, è possibile installarlo correttamente.

+0

Grazie per questo. Brillante! –

0

So che questo non è bello. So che si sentirà sporco. Non mi piace scaricare le gemme che non userò. Ma questo ha funzionato per me.

Ho riscontrato lo stesso problema su 2 macchine diverse più le mie con bundler che cercava di ottenere il debugger 1.6.0 con Ruby 1.7.3 (e alcune altre gemme). Si è rifiutato di scaricare e farlo manualmente non ha funzionato neanche. Mi sono imbattuto in un giro di lavoro cercando di installare altre versioni per vedere se si trattava di un problema con la versione. Ciò che ha funzionato (e non so perché funzioni) è che ho eseguito "bundle update", quindi "git checkout." Per ripristinare il file gemlock, quindi eseguire "bundle install". Questo ha funzionato ogni volta per me.

Questa è una supposizione, ma penso che "bundle install" ordina l'elenco di gemme da scaricare e si interrompe al primo che genera un errore in modo che le dipendenze non vengano scaricate. Durante l'esecuzione di "aggiornamento bundle" passa attraverso l'elenco e ottiene l'ultima versione, quindi se viene generato un errore, viene segnalato l'errore. Quindi se c'è qualche tipo di dipendenza circolare nella gem questa soluzione potrebbe risolverlo perché otterrebbe la dipendenza o una versione praticabile che stava causando il problema. Non riesco a trovare la prova che ciò sia possibile anche.

problema simile: bundle install circular dependencies

Problemi correlati