this is how it should work: I log in to the admin panel, go to cars/new and fill up the fields, press create and I should have a new car in my list. www.autozeep.com
the thing is that it goes ok until I press the Create button to create the new car, server logs shows this:
NameError (uncaught throw `warden'): app/controllers/application_controller.rb:9:in `login_required' app/middleware/flash_session_cookie_middleware.rb:17:in `call'
in the development mode this is working fine, on the server in production mode it's not, it's the same code, nothing changed. for more server logs: http://pastie.org/3028350
application_controller class ApplicationController < ActionController::Base protect_from_forgery # filter def login_required return true if authenticated? warden.authenticate! end
users_controller: http://pastie.org/3028586
I can edit a car, it works fine so the update and edit functions from cars_controller are ok, I checked the new and create functions from cars_controller but I couldn't fine anything that would give me an idea of what is going on. Cars_controller: http://pastie.org/3028452
Please help, I have this app allready running and the client si waiting for this problem only to be solved. Thank you all very much.
EDIT
NameError in CarsController#create uncaught throw `warden' Rails.root: /u/apps/zeepauto/releases/20111123173432 Application Trace | Framework Trace | Full Trace app/controllers/application_controller.rb:9:in `login_required' app/middleware/flash_session_cookie_middleware.rb:17:in `call' ENV DUMP ... .... rack.url_scheme: "http" rack.version: [1, 0] warden: Warden::Proxy:-621456458 @config={:default_strategies=>{:_all=>[:database]}, :failure_app=>UsersController, :default_scope=>:default, :scope_defaults=>{}, :intercept_401=>true} warden.options: {:attempted_path=>"/cars", :action=>"unauthenticated"}
I get this errors only when I add new car, I can edit cars, news, contacts. everything except cars.
PROBLEM SOLVED
This problem was caused by some jquery library, I am using dynamic_form in this form so when I select car name in the next select_box appears only models for the selected car. Inspecting the problem (with my teacher, I wouldn't think of it by myself) we see that when I select car, a process called "dynamic_carmodels" is running in the logs to update the carmodels list and also at this point the session key is changed by another one, normally if session key is changed, the session that I started when I logged in is not valid anymore and that's why I get an "unauthenticated error". Still have no idea what jquery exactly was causing the problem but finally I got this solved, this was not because of the warden configuration.