Search code examples
ruby-on-railsruby-on-rails-3debuggingrubymine

Debugging with RubyMine


I am trying to debug with RubyMine 5.4 but I have constantly the following error.

/Users/jcr/.rvm/rubies/ruby-2.0.0-p247/bin/ruby -e at_exit{sleep(1)};$stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift) /Users/jcr/.rvm/gems/ruby-2.0.0-p247/gems/ruby-debug-ide-0.4.22/bin/rdebug-ide --port 53791 --dispatcher-port 53792 -- /Users/jcr/web/myapp/produccion/script/rails server -b 0.0.0.0 -p 3090 -e development
Fast Debugger (ruby-debug-ide 0.4.22, debase 0.0.9) listens on 127.0.0.1:53791
/Users/jcr/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/x86_64-darwin12.5.0/psych.bundle: warning: already initialized constant Psych::Parser::ANY
/Users/jcr/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/x86_64-darwin12.5.0/psych.bundle: warning: already initialized constant Psych::Parser::UTF8
/Users/jcr/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/x86_64-darwin12.5.0/psych.bundle: warning: already initialized constant Psych::Parser::UTF16LE
/Users/jcr/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/x86_64-darwin12.5.0/psych.bundle: warning: already initialized constant Psych::Parser::UTF16BE
Uncaught exception: superclass mismatch for class SyntaxError
    /Users/jcr/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/psych/syntax_error.rb:5:in `<module:Psych>'
    /Users/jcr/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/psych/syntax_error.rb:1:in `<top (required)>'
    /Users/jcr/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/psych.rb:1:in `require'
    /Users/jcr/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/psych.rb:1:in `<top (required)>'
    /Users/jcr/.rvm/gems/ruby-2.0.0-p247/gems/activesupport-3.2.12/lib/active_support/ordered_hash.rb:2:in `require'
    /Users/jcr/.rvm/gems/ruby-2.0.0-p247/gems/activesupport-3.2.12/lib/active_support/ordered_hash.rb:2:in `<top (required)>'
    /Users/jcr/.rvm/gems/ruby-2.0.0-p247/gems/activesupport-3.2.12/lib/active_support/core_ext/enumerable.rb:1:in `require'
    /Users/jcr/.rvm/gems/ruby-2.0.0-p247/gems/activesupport-3.2.12/lib/active_support/core_ext/enumerable.rb:1:in `<top (required)>'
    /Users/jcr/.rvm/gems/ruby-2.0.0-p247/gems/activerecord-3.2.12/lib/active_record/attribute_methods.rb:1:in `require'
    /Users/jcr/.rvm/gems/ruby-2.0.0-p247/gems/activerecord-3.2.12/lib/active_record/attribute_methods.rb:1:in `<top (required)>'
    /Users/jcr/.rvm/gems/ruby-2.0.0-p247/gems/activerecord-3.2.12/lib/active_record.rb:105:in `<module:ActiveRecord>'
    /Users/jcr/.rvm/gems/ruby-2.0.0-p247/gems/activerecord-3.2.12/lib/active_record.rb:31:in `<top (required)>'
    /Users/jcr/.rvm/gems/ruby-2.0.0-p247/gems/activerecord-3.2.12/lib/active_record/railtie.rb:1:in `require'
    /Users/jcr/.rvm/gems/ruby-2.0.0-p247/gems/activerecord-3.2.12/lib/active_record/railtie.rb:1:in `<top (required)>'
    /Users/jcr/web/myapp/produccion/config/application.rb:4:in `require'
    /Users/jcr/web/myapp/produccion/config/application.rb:4:in `<top (required)>'
    /Users/jcr/.rvm/gems/ruby-2.0.0-p247/gems/railties-3.2.12/lib/rails/commands.rb:53:in `require'
    /Users/jcr/.rvm/gems/ruby-2.0.0-p247/gems/railties-3.2.12/lib/rails/commands.rb:53:in `block in <top (required)>'
    /Users/jcr/.rvm/gems/ruby-2.0.0-p247/gems/railties-3.2.12/lib/rails/commands.rb:50:in `tap'
    /Users/jcr/.rvm/gems/ruby-2.0.0-p247/gems/railties-3.2.12/lib/rails/commands.rb:50:in `<top (required)>'
    /Users/jcr/web/myapp/produccion/script/rails:6:in `require'
    /Users/jcr/web/myapp/produccion/script/rails:6:in `<top (required)>'

Process finished with exit code 0

I was trying to google it but without success. I really appreciate your help and time.

Thank you


Solution

  • If you have the debugger gem installed without the debugger-xml gem, this would cause conflict between the debugger gem you installed and the one RubyMine is using by default. I am not sure this is the issue though. Here is the debugging documentation for RubyMine: https://www.jetbrains.com/ruby/webhelp/debugging.html

    Also, this is not a solution to your problem but a way that allow you to better debug until you get your issue fixed. Debigging with Rubymine works for me but I rarely use it because I use Better Errors: https://github.com/charliesome/better_errors & if you use chrome, the RailsPanel extension can be also useful: https://github.com/dejan/rails_panel

    I hope this is helpful.