Friday, May 4, 2012

Rails 3.1 and Ruby 1.9.3p125: ruby-debug19 crashes with “Symbol not found: _ruby_threadptr_data_type”


download linecache19 and ruby-debug-base19 from RubyForge:

% curl -OL http://rubyforge.org/frs/download.php/75414/linecache19-0.5.13.gem
% curl -OL http://rubyforge.org/frs/download.php/75415/ruby-debug-base19-0.11.26.gem


compile the two gems

% gem install linecache19-0.5.13.gem
Building native extensions.  This could take a while...
Successfully installed linecache19-0.5.13
1 gem installed...
% gem install ruby-debug-base19-0.11.26.gem -- --with-ruby-include=$SANDBOX/packages/ruby-1.9.3-p0Building native extensions.  This could take a while...
Successfully installed ruby-debug-base19-0.11.26
1 gem installed...


update your Gemfile

# file: Gemfile
...
group :development do
  gem 'linecache19', '0.5.13'
  gem 'ruby-debug-base19', '0.11.26'
  gem 'ruby-debug19', :require => 'ruby-debug'
end

bundle install and test the debugger

% bundle installFetching source index for http://rubygems.org/
...
Your bundle is complete! Use `bundle show [gemname]` to see where a bundled gem is installed.
% irb
irb(main):001:0> require 'ruby-debug'
=> true
irb(main):002:0> debugger
$SANDBOX/usr/lib/ruby/1.9.1/irb/context.rb:166
@last_value = value(rdb:1) p 'hooray'
"hooray"

Ruby-debug fork:
https://github.com/cldwalker/debugger

Discussions:
http://stackoverflow.com/questions/9122232/how-do-i-install-ruby-debug-in-ruby-1-9-3-rails-3-2-1
http://blog.wyeworks.com/2011/11/1/ruby-1-9-3-and-ruby-debug
http://dirk.net/2010/04/17/ruby-debug-with-ruby-19x-and-rails-3-on-rvm
http://stackoverflow.com/questions/7054948/ruby-debug19-on-ruby-1-9-3-preview1

0 коммент.:

Post a Comment

Powered by Blogger.