I'm trying to integrate AuthLogic into my rails application, and I followed the example which defines persistence_token as a string :
https://github.com/binarylogic/authlogic_example
However when I run it with PostgreSQL 8.4 on my ubuntu desktop I get the following error :
ActiveRecord::StatementInvalid in UsersController#index
PGError: ERROR: operator does not exist: character varying = integer
LINE 1: ...* FROM "users" WHERE ("users"."persistence_token" = 21007622...
^
HINT: No operator matches the given name and argument type(s). You might need to add explicit type casts.
: SELECT * FROM "users" WHERE ("users"."persistence_token" = 2100762299) LIMIT 1
I tried to change persistence_token to an integer, but then it seemed other parts of AuthLogic did not update it.
I'm sure this must be a common problem but googling around was not very helpful, any ideas how to resolve this?
Ruby version: 1.8.7 Rails version: 2.3.5 AuthLogic version: 2.1.6
This is a problem because the rows in your table have a 'persistence_token' value of nil. Setting the column to a value will cause this error to go away. I suspect it has something to do with the way rails inspects the table columns and its interaction with authlogic.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With