ActiveRecord session store not creating new records with Thin 1.2.4 and Rails 2.2.2
-
macournoyer
Is there any error in Rails log or thin.log ?
-
macournoyer
- State changed from new to open
I cannot reproduce, can you post your environment.rb or the where your configure the session store (don't forget to hide the secret key).
Are you using Ruby 1.8.7?
What changed in 1.2.4 is that Thin now uses Rails Rack base interface if available. Maybe that is causing the issue.
-
macournoyer
Ah! 2.2.2 IS rack based, I guess it's broken or was not complete. I'll try to refine the logic to check when to use the Rack-base interface: http://github.com/macournoyer/thin/blob/66bd68c2faccad3e5d5b5de48e2...
-
macournoyer
Can you try w/ this patch and let me know if it fixes it?
I tested w/ Rails 2.3.2 and it worked.diff --git a/lib/rack/adapter/rails.rb b/lib/rack/adapter/rails.rb index 8e5fd81..24c3c06 100644 --- a/lib/rack/adapter/rails.rb +++ b/lib/rack/adapter/rails.rb @@ -32,9 +32,7 @@ module Rack end def rack_based? - ActionController.const_defined?(:Dispatcher) && - (ActionController::Dispatcher.instance_methods.include?(:call) || - ActionController::Dispatcher.instance_methods.include?("call")) + Rails::VERSION::MAJOR >= 2 && Rails::VERSION::MINOR >= 3 && Rails::VERSION::TINY >= 2 end def load_application -
macournoyer
Oops, this one should work for real now:
diff --git a/lib/rack/adapter/rails.rb b/lib/rack/adapter/rails.rb index 8e5fd81..24c3c06 100644 --- a/lib/rack/adapter/rails.rb +++ b/lib/rack/adapter/rails.rb @@ -32,9 +32,7 @@ module Rack end def rack_based? - ActionController.const_defined?(:Dispatcher) && - (ActionController::Dispatcher.instance_methods.include?(:call) || - ActionController::Dispatcher.instance_methods.include?("call")) + ::Rails::VERSION::MAJOR >= 2 && ::Rails::VERSION::MINOR >= 3 && ::Rails::VERSION::TINY >= 2 end def load_application -
macournoyer
- State changed from open to resolved
(from [b16e72ff779d9c077d24462666d4a5487449627c]) Ensure Rack base API is used in Rails adapter only if version >= 2.3.2 [#111 ActiveRecord session store not creating new records with Thin 1.2.4 and Rails... state:resolved] http://github.com/macournoyer/thin/commit/b16e72ff779d9c077d2446266...
-
macournoyer
This should be fixed in version 1.2.5 deployed yesterday on gemcutter.org
-
John
Onestamente, sono pochi i casinò che offrono grandi bonus. Se dai un'occhiata al Winnita Casinò casinò ti assicurerai che è qualcosa che può aiutarti a smettere di fare il lavoro che odi. Se vuoi lasciare il tuo lavoro e guadagnarti da vivere giocando al casinò, è la scelta https://winnitacasino-it.com/ migliore!
Please Sign in or create a free account to add a new ticket.
With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.