2012-06-17 12 views
17

Cuando trato de instalar la gema ruby-debug-base19x para depurar mi aplicación usando el IDE de RubyMine recibí el siguiente mensaje de error, ¿alguien puede ayudarme?No se puede instalar la gema ruby-debug-base19x

Estoy utilizando Mac OS X 10.7.4

/Users/danilobarsotti/.rvm/rubies/ruby-1.9.3-p194/bin/ruby extconf.rb 
checking for rb_method_entry_t.body in method.h... no 
checking for vm_core.h... no 
/Users/danilobarsotti/.rvm/gems/ruby-1.9.3-p194/gems/ruby_core_source-0.1.5/lib/ruby_core_source.rb:39: Use RbConfig instead of obsolete and deprecated Config. 
checking for rb_method_entry_t.body in method.h... no 
checking for vm_core.h... yes 
checking for iseq.h... yes 
checking for insns.inc... yes 
checking for insns_info.inc... yes 
checking for eval_intern.h... yes 
creating Makefile 

make 
compiling breakpoint.c 
compiling ruby_debug.c 
ruby_debug.c:24: error: conflicting types for ‘rb_iseq_compile_with_option’ 
/Users/danilobarsotti/.rvm/rubies/ruby-1.9.3-p194/include/ruby-1.9.1/ruby-1.9.3-p194/vm_core.h:505: error: previous declaration of ‘rb_iseq_compile_with_option’ was here 
ruby_debug.c: In function ‘call_at_line_unprotected’: 
ruby_debug.c:474: warning: implicit conversion shortens 64-bit value into a 32-bit value 
ruby_debug.c: In function ‘filename_cmp’: 
ruby_debug.c:538: warning: implicit conversion shortens 64-bit value into a 32-bit value 
ruby_debug.c:539: warning: implicit conversion shortens 64-bit value into a 32-bit value 
ruby_debug.c: In function ‘optional_frame_position’: 
ruby_debug.c:1695: warning: implicit conversion shortens 64-bit value into a 32-bit value 
ruby_debug.c: In function ‘do_jump’: 
ruby_debug.c:2310: warning: implicit conversion shortens 64-bit value into a 32-bit value 
ruby_debug.c: In function ‘context_jump’: 
ruby_debug.c:2378: warning: comparison between signed and unsigned 
ruby_debug.c:2392: warning: comparison between signed and unsigned 
make: *** [ruby_debug.o] Error 1 

EDITAR

Cuando intento instalar la gema usando los "RubyMine Gem Herramientas" (dentro RubyMine IDE) que recibieron el a continuación el mensaje:

Error running Development: myproject: Failed to Install Gems. Following gems were not installed: /Applications/RubyMine.app/rb/gems/ruby-debug-base19x-0.11.30.pre10.gem: Error installing ruby-debug-base19x-0.11.30.pre10.gem: ERROR: Failed to build gem native extension. /Users/danilobarsotti/.rvm/rubies/ruby-1.9.3-p194/bin/ruby extconf.rb checking for rb_method_entry_t.called_id in method.h... * 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=/Users/danilobarsotti/.rvm/rubies/ruby-1.9.3-p194/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}/lib /Users/danilobarsotti/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/mkmf.rb:381:in try_do': The compiler failed to generate an executable file. (RuntimeError) You have to install development tools first. from /Users/danilobarsotti/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/mkmf.rb:491:in block in try_compile' from /Users/danilobarsotti/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/mkmf.rb:443:in with_werror' from /Users/danilobarsotti/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/mkmf.rb:491:in try_compile' from /Users/danilobarsotti/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/mkmf.rb:1002:in block in have_struct_member' from /Users/danilobarsotti/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/mkmf.rb:790:in block in checking_for' from /Users/danilobarsotti/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/mkmf.rb:284:in block (2 levels) in postpone' from /Users/danilobarsotti/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/mkmf.rb:254:in open' from /Users/danilobarsotti/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/mkmf.rb:284:in block in postpone' from /Users/danilobarsotti/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/mkmf.rb:254:in open' from /Users/danilobarsotti/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/mkmf.rb:280:in postpone' from /Users/danilobarsotti/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/mkmf.rb:789:in checking_for' from /Users/danilobarsotti/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/mkmf.rb:1001:in have_struct_member' from extconf.rb:6:in block in ' from extconf.rb:31:in call' from extconf.rb:31:in block in ' from /Users/danilobarsotti/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/mkmf.rb:527:in with_cppflags' from extconf.rb:30:in ' Gem files will remain installed in /Users/danilobarsotti/.rvm/gems/ruby-1.9.3-p194/gems/ruby-debug-base19x-0.11.30.pre10 for inspection. Results logged to /Users/danilobarsotti/.rvm/gems/ruby-1.9.3-p194/gems/ruby-debug-base19x-0.11.30.pre10/ext/ruby_debug/gem_make.out /Users/danilobarsotti/Library/Preferences/RubyMine40/rb/linecache19-0.5.13.gem: Error installing linecache19-0.5.13.gem: ERROR: Failed to build gem native extension. /Users/danilobarsotti/.rvm/rubies/ruby-1.9.3-p194/bin/ruby extconf.rb checking for vm_core.h... * 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=/Users/danilobarsotti/.rvm/rubies/ruby-1.9.3-p194/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}/lib /Users/danilobarsotti/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/mkmf.rb:381:in try_do': The compiler failed to generate an executable file. (RuntimeError) You have to install development tools first. from /Users/danilobarsotti/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/mkmf.rb:506:in try_cpp' from /Users/danilobarsotti/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/mkmf.rb:931:in block in have_header' from /Users/danilobarsotti/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/mkmf.rb:790:in block in checking_for' from /Users/danilobarsotti/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/mkmf.rb:284:in block (2 levels) in postpone' from /Users/danilobarsotti/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/mkmf.rb:254:in open' from /Users/danilobarsotti/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/mkmf.rb:284:in block in postpone' from /Users/danilobarsotti/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/mkmf.rb:254:in open' from /Users/danilobarsotti/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/mkmf.rb:280:in postpone' from /Users/danilobarsotti/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/mkmf.rb:789:in checking_for' from /Users/danilobarsotti/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/mkmf.rb:930:in have_header' from extconf.rb:15:in block in ' from /Users/danilobarsotti/.rvm/gems/ruby-1.9.3-p194/gems/ruby_core_source-0.1.5/lib/ruby_core_source.rb:18:in call' from /Users/danilobarsotti/.rvm/gems/ruby-1.9.3-p194/gems/ruby_core_source-0.1.5/lib/ruby_core_source.rb:18:in create_makefile_with_core' from extconf.rb:19:in ` ' Gem files will remain installed in /Users/danilobarsotti/.rvm/gems/ruby-1.9.3-p194/gems/linecache19-0.5.13 for inspection. Results logged to /Users/danilobarsotti/.rvm/gems/ruby-1.9.3-p194/gems/linecache19-0.5.13/ext/trace_nums/gem_make.out

Respuesta

19

1) Trate de descarga linecache19-0.5.13.gem y Ruby-debug-base19-0.11.26.gem de http://rubyforge.org/frs/?group_id=8883

2) gem install linecache19-0.5.13.gem

3) gem install ruby-debug-base19-0.11.26.gem - with-rubí-include = [su fuente de rubí] o puede probar gem install ruby-debug-base19x --pre

+1

He descargado linecache19-0.5.13.gem e instalado, luego ejecuté gem install ruby-debug-base19x --pre y ahora todo está funcionando, ¡RubyMine está depurando mi código perfectamente! ¡Gracias! ¡Realmente aprecié tu ayuda! – danilodeveloper

+0

¡Gracias por stackoverflow! – odiszapc

+0

¡Estuve tanteando con esto en otro tema durante mucho tiempo! ¡Gracias! +1 – janechii

4

Usted puede intentar

gem install ruby-debug-ide19 

(según wiki). Esto se instala para mí en OS X 10.7.4, pero es posible que desee darle una oportunidad a la gema debugger (gem install debugger). En realidad se mantiene, a diferencia de la mayoría de las gemas ruby-debug *.

+0

no funcionó, aún con el mismo problema :(, he editado mi pregunta e incluye más información TKS – danilodeveloper

+0

Esto funcionó en Mac OS X Mountain Lion 10.8.2 –

+0

+ 1, esto me ahorró mucho dolor. –

3

Justo elimine toda la gema relacionada con la depuración de sus gemas/gemset y luego deje que RubyMine vuelva a instalar las gemelas adecuadas. Trabajó para mi.

+0

Esto también me funcionó, cuando ejecuté "gem un install linecache19 "Descubrí otras versiones de Ruby-Debug que dependen de él. –

1

La solución de @ gamov funcionó para mí, simplemente deje que RubyMine instale todas las gemas necesarias para la depuración.

Si está instalando todas las gemas por su cuenta, es importante asegurarse de que las versiones sean correctas.

De todos modos, aquí está la lista de las joyas que fueron realmente necesario para RubyMine depurar mi código:

lista joya

  • BigDecimal (1.1.0)
  • depurador-ruby_core_source (1.2. 3)
  • io-consola (0,3)
  • json (1.5.5)
  • minitest 2.5.1)
  • rastrillo (0.9.2.2)
  • rdoc (3.9.5)
  • ruby-debug-base19x (0.11.30.pre12)
  • ruby-debug-ide 0.4.17)

Espero que esto ayude y espero que más personas no tengan que recurrir a las viejas costumbres que habíamos estado haciendo en el pasado.

Asegúrese de instalar DevKit antes de intentar depurar usando RubyMine. Debería poder obtener DevKit de la página del instalador de ruby ​​(Nota: diferentes versiones de DevKit están disponibles para diferentes versiones de ruby) Extraiga el archivo DevKit Zip y haga lo siguiente en el directorio al que había extraído el DevKit: ' Ruby dk.rb init ' ' Ruby dk.rb install '

+0

¡Tks! Entonces, si esta pregunta te ayuda, por favor devuélvete. ;) – danilodeveloper

+0

Ojalá pudiera votar la pregunta, pero soy nuevo aquí! Necesito más puntos antes de poder empezar a hacer eso ...: C –

0

Tuve un problema diferente que me impidió instalar ruby-debug-base19x pero dio como resultado errores específicos diferentes a los que obtuvo danilodeveloper. Mencionándolo aquí ya que aquellos que tienen mi problema probablemente encontrarán esta pregunta primero:

RubyMine 5.4.3.2.1 [amo ese número de versión] instaló una versión de la gema debugger-ruby_core_source (1.1.9) que era demasiado antigua para el ruby-debug-base19x que quería (0.11.30.pre12) y/o el ruby ​​que estoy usando (1.9.3-p484). La solución fue

gem update debugger-ruby_core_source 

(llevándola a 1.3.2) y dejar RubyMine intenta instalar ruby-debug-base19x nuevo, lo que sucedió.

0

Tenía una versión de rubí incorrecta en rubímina; en la barra de menú, vaya a "Rubymine" -> "preferencias" -> "Ruby SDK and Gems" y asegúrese de que esté apuntando a la versión de Ruby que está esperando.

Encontrado esta idea aquí:.! https://stackoverflow.com/a/21056201/1462575

Cuestiones relacionadas