Closed prashantjois closed 9 years ago
Looks like adding the base64: true
option to encrypt_with_public_key
fixed the problem. I think this may have something to do with the bytea
type in postgres? Not sure if this is a new problem or whether my encrypted data in the past just happened to not contain a null byte.
Looks like it's a bug in Rails when using the bytea
type. https://bitbucket.org/ged/ruby-pg/issue/198/argumenterror-string-contains-null-byte Using base64:
. as you found type will let you you work around it.
Hey there,
I'm getting this error when trying to save my model:
string contains null byte
Here's the stack trace from the console:
Any ideas?