My environment:
Ubuntu 14
Ruby 2.2.1
Rails 4.2
Newly created rails application, with 1 action:
class FramesController < ApplicationController
def index
return 0
end
end
Wherever I put a breakpoint (in presented case at return 0), I get this error in my browser:
undefined method `+' for nil:NilClass
It only happens when I use the 'Debug' option in RubyMine and when a breakpoint is reached. When I run the server without debugger/breakpoints, everything works fine.
raise
instead ofreturn 0
as the breakpoint? I have a feeling that returning the number 0 here is causing problems with Rails controller conventions that you can't see.