Forum: Ruby on Rails "string not matched" with AR session store

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
78b15ebcefd5841518b097a2615ea9ca?d=identicon&s=25 felix.mccoey (Guest)
on 2005-11-15 02:17
(Received via mailing list)
hi all,

i have had this problem for a while and so have been unable to use
activerecord to store my sessions.

shortly after login it get a 'string not matched' exception and it looks
like it is occuring during some 'flash' methods. i was under the
impression that this used to occur when your session was too large so i
have reduced my session values to just id's (rather than storing entire
objects) to reduce their size. it still  happens.

i would really like to get my sessions in the database. has anyone else
had trouble with this.

i have the following specs:

mysql 4.1.15
rails 0.14.2.2752
activerecord 1.12.2.2752
using webrick

thanks heaps,

-felix
24d2f8804e6bb4b7ea6bd11e0a586470?d=identicon&s=25 jeremy (Guest)
on 2005-11-15 13:31
(Received via mailing list)
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Nov 14, 2005, at 5:16 PM, Felix McCoey wrote:
> objects) to reduce their size. it still  happens.
> using webrick
>
> thanks heaps,

Hi Felix,

Are you on Windows, Linux, Mac, ?

Are you using the mysql adapter that comes with Rails, or did you
upgrade to the C bindings (gem install mysql)?

Does the problem occur outside of webrick?

Thanks!
jeremy
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (Darwin)

iD8DBQFDedSYAQHALep9HFYRAs5YAJsHb30+5Jvn5HSuXuSfROrpOrt0wgCeKTY3
LG0373dAyh68WcdQSQbPYRs=
=WJvU
-----END PGP SIGNATURE-----
05d703f649ef1d07e78d7b479fb4c4ac?d=identicon&s=25 james.adam (Guest)
on 2005-11-15 13:59
(Received via mailing list)
This problem *sounds* like an issue we've seen where using
ActiveRecord-backed session stores under development mode suddenly
reverts back to PStore sessions after a few accesses. FYI, we've seen
this on Rails 0.13.1, using the SQLServer adapter in ODBC mode, with
Webrick.

Are you seeing 'pstore' in your error messages at all? If so,
basically it seems like the session-store configuration gets lost in
all the reloading jazz (it works fine in production, we've seen).

I wish I could give you a solution...

- james
78b15ebcefd5841518b097a2615ea9ca?d=identicon&s=25 felix.mccoey (Guest)
on 2005-11-16 00:05
(Received via mailing list)
Jeremy Kemper wrote:
 > Are you on Windows, Linux, Mac, ?
>
> Are you using the mysql adapter that comes with Rails, or did you
> upgrade to the C bindings (gem install mysql)?

i am currently on linux using the mysql adapter that comes with rails. i
will try the gem one and report

> Does the problem occur outside of webrick?

yes, it has happened with lighttpd and apache2 and just using irb so i
don't think that is an issue.

-felix
78b15ebcefd5841518b097a2615ea9ca?d=identicon&s=25 felix.mccoey (Guest)
on 2005-11-16 01:32
(Received via mailing list)
James Adam wrote:
> This problem *sounds* like an issue we've seen where using
> ActiveRecord-backed session stores under development mode suddenly
> reverts back to PStore sessions after a few accesses. FYI, we've seen
> this on Rails 0.13.1, using the SQLServer adapter in ODBC mode, with
> Webrick.
>
> Are you seeing 'pstore' in your error messages at all? If so,
> basically it seems like the session-store configuration gets lost in
> all the reloading jazz (it works fine in production, we've seen).

yes, i get the following in the trace:

#{RAILS_ROOT}usr/lib/ruby/1.8/cgi/session/pstore.rb:25:in `[]='
#{RAILS_ROOT}usr/lib/ruby/1.8/cgi/session/pstore.rb:25:in `[]='
#{RAILS_ROOT}usr/lib/ruby/gems/1.8/gems/actionpack-1.10.2.2752/lib/action_controller/flash.rb:141:in
`flash'
#{RAILS_ROOT}usr/lib/ruby/gems/1.8/gems/actionpack-1.10.2.2752/lib/action_controller/flash.rb:154:in
`fire_flash'

now if it works in a production environment and not development then
that is great, just make testing all my session accessing function a
little trickier.

does anyone actually know what is causing it?

> I wish I could give you a solution...

pity, but thanks

-felix
F44d76e529953b288cf0d21f95a705cd?d=identicon&s=25 eravelo (Guest)
on 2005-11-17 14:31
(Received via mailing list)
Oops! I've been bitten by this very often in development, and *also* in
production.
I've seen this on Windows+Webrick, Windows+Apache2+FCGI,
Debian+Apache2+FCGI
(all Mysql)

Everything went OK on my Typo-based commerce app, untill I added a cart
object to be stored in the session. Since then, this problem periodicaly
shows up.

I'm now desperatly looking for a fix to this issue, and can provide more
environment data if needed.

ERic
This topic is locked and can not be replied to.