Search code examples
debuggingruby-on-rails-3.1rubymine

Ruby crashes when trying to debug Rails with RubyMine


When I try to debug rails 3.1 (ruby 1.9.2_p290) with RubyMine 3.2.4 on OSX Lion, I get a

/Users/dinguva/.rvm/gems/ruby-1.9.2-p290/gems/activesupport-3.1.0/lib/active_support/whiny_nil.rb:58: [BUG] Segmentation fault
ruby 1.9.2p290 (2011-07-09 revision 32553) [x86_64-darwin11.2.0]
... (truncated)
You may have encountered a bug in the Ruby interpreter or extension libraries.

The whole trace is here: http://pastebin.com/PWvXbgpY

Here are the debug related gems installed:
gem list | grep debug
ruby-debug-base19 (0.11.25)
ruby-debug-base19x (0.11.30.pre4, 0.11.30.pre2, 0.11.29, 0.11.26)
ruby-debug-ide (0.4.17.beta8, 0.4.17.beta3)
ruby-debug19 (0.11.6)

I have no problems running rails server from console or running it from the RubyMine IDE. The above error occurs only when I try to debug from within Rubymine. Any pointers would be greatly appreciated.


Solution

  • The crash seems to happen inside Rails 3 activesupport. If you've updated your Ruby version recently, it could help if you rebuild gems with native extensions.

    I'd try to remove all the debug gems and install them again using the following commands:

    gem install ruby-debug-base19x --pre
    gem install ruby-debug-ide --pre
    

    (or appropriate rvm commands)

    You should get the following versions only:

    ruby-debug-base19x (0.11.30.pre4)
    ruby-debug-ide (0.4.17.beta8)
    

    Other debug gems are not needed. Also try to reinstall Rails 3 gems.

    If it doesn't help, try Ruby 1.9.3.