Note that there are some explanatory texts on larger screens.

plurals
  1. POhow do I install ruby-debug in ruby 1.9.3 / Rails 3.2.1
    text
    copied!<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="https://stackoverflow.com/questions/9442200/rails-3-1-and-ruby-1-9-3p125-ruby-debug19-still-crashes-with-symbol-not-found">Rails 3.1 and Ruby 1.9.3p125: ruby-debug19 still crashes with &ldquo;Symbol not found: _ruby_threadptr_data_type&rdquo;</a> </p> </blockquote> <p>I'm done with printing to the console -- I want to move up to the 20th century and start using a debugger!! But how do I install ruby-debug? The native compilation of <code>ruby-debug.c</code> fails when I try to install the ruby-debug19 gem. I've looked over other SO postings and haven't found the answer yet...</p> <ul> <li>I am using Ruby 1.9.3-p0</li> <li>I am using Rails 3.2 (with Gemfile, of course)</li> <li>I am NOT using RVM -- instead, I have a fully sandboxed directory containing all executables, gems, sources, etc. I refer to it as $SANDBOX below...</li> </ul> <h2>bundle install doesn't work</h2> <p>If I add ruby-debug19 to my Gemfile and do <code>bundle install</code>, it fails during build with <code>conflicting types for 'rb_iseq_compile_with_option'</code>:</p> <pre><code># file: Gemfile ... group :development do gem 'ruby-debug19' end ... % bundle install ... Installing ruby-debug-base19 (0.11.25) with native extensions Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension. /Users/r/Developer/Topaz/usr/bin/ruby extconf.rb ... ruby_debug.c:29: error: conflicting types for 'rb_iseq_compile_with_option' $SANDBOX/usr/include/ruby-1.9.1/ruby-1.9.3-p0/vm_core.h:505: error: previous declaration of 'rb_iseq_compile_with_option' was here ... make: *** [ruby_debug.o] Error 1 </code></pre> <h2>gem install ruby-debug from the command line doesn't work</h2> <p>If I try building the gem from the command line, using the --with-ruby-include argument pointing at the <code>include</code> directory for the current ruby, I get the same error:</p> <pre><code>% gem install ruby-debug19 -- --with-ruby-include=$SANDBOX/packages/ruby-1.9.3-p0 Building native extensions. This could take a while... ERROR: Error installing ruby-debug19: ERROR: Failed to build gem native extension. $SANDBOX/usr/bin/ruby extconf.rb --with-ruby-include=$SANDBOX/packages/ruby-1.9.3-p0/include 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:29: error: conflicting types for 'rb_iseq_compile_with_option' $SANDBOX/usr/include/ruby-1.9.1/ruby-1.9.3-p0/vm_core.h:505: error: previous declaration of 'rb_iseq_compile_with_option' was here </code></pre> <h2>what am I missing?</h2> <p>Is --with-ruby-include expecting something different? Is the current ruby-debug19 broken?</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload