17

When I try to install ruby-debug-base19x gem for debug my application using the RubyMine IDE I received the below error message, can anybody help me?

I'm using 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

EDIT

When I try to install the gem using the "RubyMine Gem Tools" (inside RubyMine IDE) I received the message below:

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:inblock in ' from extconf.rb:31:in call' from extconf.rb:31:inblock 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:inblock 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

6 Answers 6

19

1) Try download linecache19-0.5.13.gem and ruby-debug-base19-0.11.26.gem from 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-ruby-include=[your ruby source] or you can try gem install ruby-debug-base19x --pre

2
  • 1
    I downloaded linecache19-0.5.13.gem and install, then I executed gem install ruby-debug-base19x --pre and now everything is working, the RubyMine is debugging my code perfectly!! Thank you!! I really appreciated your help!!!! Jun 18, 2012 at 1:52
  • so awesome! i've been fumbling with this on another issue for a long time. Thanks! +1
    – janechii
    Jul 23, 2012 at 22:08
4

You can try

gem install ruby-debug-ide19

(according to the wiki). This installs for me on OS X 10.7.4, but you may want to give the debugger gem a shot (gem install debugger). It's actually maintained, unlike most of the ruby-debug* gems.

1
  • did not work, still with the same problem :( , I edited my question and includes more information. tks! Jun 18, 2012 at 0:05
3

Just remove all debug related gem from your gems/gemset then let RubyMine reinstall the proper ones. Worked for me.

1
  • This worked for me as well, when I ran "gem uninstall linecache19" I discovered other ruby-debug versions depending on it. Mar 25, 2013 at 22:45
1

@gamov's solution worked for me, just let RubyMine install all the gems needed for the debugging.

If you are installing all the gems on your own, it is important to ensure that the versions are correct.

Anyway, here is the list of gems that were really needed for RubyMine to Debug my code:

gem list

  • bigdecimal (1.1.0)
  • debugger-ruby_core_source (1.2.3)
  • io-console (0.3)
  • json (1.5.5)
  • minitest 2.5.1)
  • rake (0.9.2.2)
  • rdoc (3.9.5)
  • ruby-debug-base19x (0.11.30.pre12)
  • ruby-debug-ide 0.4.17)

Hope this helps and hope more people would not have to resort to the old ways that we had been doing in the past.

Please ensure that you install the DevKit before trying to debug using RubyMine. You should be able to get the DevKit from the ruby installer page (Note: different DevKit versions are available for different ruby versions) Extract the DevKit Zip file and do the following in the directory that you had extracted the DevKit to: 'Ruby dk.rb init' 'Ruby dk.rb install'

1
  • i wish i could voteup the question, but i am new here! need more points before i could start doing that... :C Sep 23, 2013 at 7:00
0

I had a different problem which prevented me from installing ruby-debug-base19x but resulted in different specific errors than danilodeveloper got. Mentioning it here since those who have my problem will probably find this question first:

RubyMine 5.4.3.2.1 [love that version number] installed a version of the debugger-ruby_core_source gem (1.1.9) which was too old for the ruby-debug-base19x it wanted (0.11.30.pre12) and/or the ruby I'm using (1.9.3-p484). The solution was to

gem update debugger-ruby_core_source

(bringing it to 1.3.2) and let RubyMine try to install ruby-debug-base19x again, which succeeded.

0

I had the wrong ruby version set in rubymine; in the menu bar go to "Rubymine" -> "preferences" -> "Ruby SDK and Gems" and make sure it is pointed to the version of Ruby you are expecting.

Found this idea here: https://stackoverflow.com/a/21056201/1462575

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.