ruby on rails - Session not getting initialized -
i've been trying last 4 days understand has happened session isn't getting initialized anymore.
my app working fine, until 1 day started having error
undefined local variable or method `session' < staticpagescontroller:0x7c84728 >
i debugged , tracked down request_forgery_protection.rb file, under action_controller\metal.
def form_authenticity_token session[:_csrf_token] ||= securerandom.base64(32) end so, apparently, session wasn't being loaded.
i tried suggestions how force session loaded?, may see below.
def root if signed_in? ... else session[:init] = true session[:init] @prospect = prospect.new() render 'retailers/retailers_home' end end but still same error keeps showing up.
under intializers, session_store.rb, seems fine :
recibosonline::application.config.session_store :cookie_store, key: '_recibosonline_session' as exact code works on other developer's machine, on other server. must specific machine...but why??
what might causing this?
when else fails , nothing makes sense anymore, reset world:
git clean -fdx
Comments
Post a Comment