1

I'm ruby 2.2.1 and rails 4.2.0 with RubyMine 7.0.4. I tried to use the graphical debugger but every time when it hits a brake point I get the following error in my browser:

undefined method '+' for nil:NilClass

Ilie NEACSU
  • 530
  • 3
  • 12
  • 1
    The stack trace will point you to the line causing the problem, and you should be able to see there which variable is before the `+` - this is the variable which is equal to nil and the code is expecting to not be nil. From there you can look at the params etc and work out why the variable has not been set (or has been set to nil). – Max Williams Mar 20 '15 at 13:52
  • This error shows up whenever the code execution hits a breakpoint. It's not an error in my code, if i don't set a breakpoint the error doesn't appear. I guess the error is somehow generated by the debugger. – Ilie NEACSU Mar 20 '15 at 13:56
  • ah i see, i beg your pardon. – Max Williams Mar 20 '15 at 16:28
  • What research have you done? Have you checked the Rubymine bug reports? What does your gem file look like? – Beartech Mar 20 '15 at 17:36

1 Answers1

1

I encountered this problem just now and solved it simply by commenting out byebug in the development group in your Gemfile.

group :development, :test do
  gem 'sqlite3',     '1.3.9'
#  gem 'byebug',      '3.4.0'
  gem 'web-console', '2.0.0.beta3'
  gem 'spring',      '1.1.3'
end

I think it's because this new rails built-in debugger is colliding with the one provided by RubyMine and byebug wins.

Save the revised Gemfile and restart your server in debug mode and everything should be back to normal again :)

jwong
  • 338
  • 6
  • 15