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

。_饼干妹妹 提交于 2019-11-27 05:07:51

A fork of ruby-debug just called 'debugger' now exists that incorporates many of the fixes people had been deploying on top of ruby-debug19, so you should be able to just change your Gemfile to

gem 'debugger'

... and off you go.

Long story short: it's not resolved, and official resolution will only come with a new version of ruby-debug19 or ruby-debug-base19. It's pretty aggravating, I know.

I've done a lot of digging on this, too, and I've kept an eye on things since 1.9.3 came out (because we'd love-love-love to use it in production). However, sadly, 1.9.3-p125 doesn't have a fix for ruby-debug. Only ruby-debug19 will have the fix for ruby-debug19, as the authors of ruby-debug19 and ruby-debug-base19 have been working on a patch and have an updated test build working on Ruby 1.9.3… but they haven't released it to the general public. ruby-debug-base19 hasn't seen a release in eons; ruby-debug19 even longer (since '09).

If you're on rvm head, you should be able to install 1.9.3-p125 with the added "falcon patch" found here (and noted about RVM here. This gist seems to have better instructions (it's a newer fork of the older one).

The best thing to do is just use pry. Its an irb-like replacement for ruby-debug and it works with all version of Ruby with no nasty patching!

https://github.com/pry/pry

You must pass the --with-ruby-include and point it at your src directory for this to work.

(most of these answers elsewhere on SO have gone stale since 1.9.3-p125.)

I've written up new instructions here for ubuntu 11.10 that work on my machine, but give them a try on darwin and see if they help?: https://gist.github.com/2218661

I've been having similar problems using Rails 3.2 with Ruby 1.9.3p0 debugging in Aptana.
For me, new ruby-debug-base193 does not compile. But what works fine is a fix that has been posted elsewhere:

Gemfile:
gem 'ruby-debug-ide19'
gem 'ruby-debug-base19'

And then providing the missing is_binary_data? method somewhere. I put it in my Rails application.rb file like so:

class String
  def is_binary_data?
    ( self.count( "^ -~", "^\r\n" ).fdiv(self.size) > 0.3 || self.index( "\x00" ) ) unless empty?
  end
end
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!