I think only two lines could cause this
Which line does it say the error comes from in your output?
You could write some
Rails.logger.debug "Hi, this is the current status:
between every line and then watch your logs/development.log to see
where exactly it breaks.
I would guess on set_eros_values (whatever that function is supposed