psych icon indicating copy to clipboard operation
psych copied to clipboard

rails console on reload: undefined method `end_line=' for nil (NoMethodError)

Open thisIsLoading opened this issue 1 year ago • 0 comments

Hi,

everytime i reload! the rails console i get this error:

irb(main):008> reload!
Reloading...
(irb):8:in `<main>': undefined method `end_line=' for nil (NoMethodError)

      node.end_line   = @end_line
          ^^^^^^^^^^^^^
irb(main):009> 

it was annoying but didnt bother me enough to dig a little deeper. but today was the day. so i searched my whole computer for that line and ended up in the psych gem folder right here:

https://github.com/ruby/psych/blob/ea79a95e2da83be7fca102f23503713caa6820d4/lib/psych/tree_builder.rb#L134

    def set_end_location(node)
      node.end_line   = @end_line
      node.end_column = @end_column
    end`

it is obviously not the actual cause of the issue but has anyone an idea how i could figure out where the issue is?

thanks in advance!

thisIsLoading avatar Aug 22 '24 06:08 thisIsLoading