In my Rails 4.1.7 application I'm trying to connect with Evernote through this Oauth gem. I have the following code to connect: (of course with the callback URL specific to my installation)
In need to put the request_token in the session because I need it later when I return on the callback url that processes the rest. From Rails 4.1 it's not possible anymore to save entire objects in a session, so I have to serialize it. The size of the Oauth object was to large to put in a session as JSON or Hash (Rails has a maximum of 4kb). So I tried to serialize the object with Marshal or MessagePack, but that gave me an encoding error: Encoding::UndefinedConversionError "\x9C" from ASCII-8BIT to UTF-8
That worked, but resulted in a ArgumentError: dump format error for symbol(0x45) error. I tried everything, but nothing seems to work. Any ideas how to solve this?
In my Rails 4.1.7 application I'm trying to connect with Evernote through this Oauth gem. I have the following code to connect: (of course with the callback URL specific to my installation)
In need to put the
request_token
in the session because I need it later when I return on the callback url that processes the rest. From Rails 4.1 it's not possible anymore to save entire objects in a session, so I have to serialize it. The size of the Oauth object was to large to put in a session as JSON or Hash (Rails has a maximum of 4kb). So I tried to serialize the object with Marshal or MessagePack, but that gave me an encoding error:Encoding::UndefinedConversionError "\x9C" from ASCII-8BIT to UTF-8
Then I tried to force UTF-8/ISO-8859-1 encoding:
That worked, but resulted in a
ArgumentError: dump format error for symbol(0x45)
error. I tried everything, but nothing seems to work. Any ideas how to solve this?