this one helps. I was having the same challenge and after reading all of the answers and finding no success. This is how I fixed the error: Open Finder and checked the path to my code. My path was myMac/Code/my apps.
Rails instance variables not shared between helpers in ApplicationController and app/helpers
it helps some times An instance variable is not a global variable - it is tied to a particular instance (hence the name). Rails allows you to access controller instance variables from a view. This works by copying the controller instance variables: the view_assigns methods in AbstractController::Rendering creates a hash of all the instance variables. Later on, the view object uses that hash to recreate the instance variables. When you say that it's as if there are local copies of the variable being made, that's pretty much exactly what is happening.
Rails “helpers” are very specifically view helpers
I think the issue was by ths following , To satisfy my supervisor (or code reviewer), I had to copy/paste all session helper code on every single controller file, since copying it in application_controller was not enough.