Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Type error with Rails 7.0.2 and Ruby 3.1.1 #47

Open
eromas opened this issue Feb 26, 2022 · 2 comments
Open

Type error with Rails 7.0.2 and Ruby 3.1.1 #47

eromas opened this issue Feb 26, 2022 · 2 comments

Comments

@eromas
Copy link

eromas commented Feb 26, 2022

Hello there,
I get:

TypeError at /documents can't dump IO.

mongo_session_store (3.2.1) lib/mongo_session_store/mongoid_store.rb, line 17

   store_in collection: MongoSessionStore.collection_name

    field :_data, type: BSON::Binary, default: -> { pack({}) }

    def self.pack(data)

17 BSON::Binary.new(Marshal.dump(data), :generic)

    end

Note:
This error does not appear with Rails 6.1.4.6 and Ruby 3.1.1

PS:
This error appears if params[...] is stored to mongoid session store.
It does not appear if params[...].to_enum.to_h is stored to mongoid session store instead.

@tombruijn
Copy link
Collaborator

Hi @eromas, thanks for the report! I haven't had time to look into it. Looks like the CI is also no longer working for this project, so it's a bit of a chore to get a fix out. If you manage to find a fix or workaround, please let us know :)

@eromas
Copy link
Author

eromas commented Mar 10, 2022

Hi, I found a workaround here:
https://dev.to/notapatch/rails-going-backwards-56h5
Solution 4: Back with session

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants