Giter Site home page Giter Site logo

Comments (7)

carlosantoniodasilva avatar carlosantoniodasilva commented on May 27, 2024 2

@gagoit I'm not able to replicate this on a brand new 7.1 app:

Screenshot 2023-10-10 at 09 48 44

I'm still looking, it's possible something fundamental has changed somewhere, but wanted to mention the above in case I'm missing something from your example. Thanks.

from devise.

gagoit avatar gagoit commented on May 27, 2024 1

I also faced to this issue, and I saw that came from this change. The hash#deep_merge has been changed behavior:

  • In rails 7.0.8
    Screenshot 2023-10-09 at 09 59 18

  • In rails 7.1.0
    Screenshot 2023-10-09 at 09 59 25

So when we use Devise.with_options with multiple blocks inside (for adding multiple modules), the options that passed to each module has been merged, that make the Devise::STRATEGIES has been changed in-correctly => warden has failed to load the incorrect strategies

NOTE:

  • In rails 7.0.8, the Devise::STRATEGIES won't include trackable, timeoutable, lockable...
  • In rails 7.1.0, the Devise::STRATEGIES will include trackable, timeoutable, lockable...

from devise.

carlosantoniodasilva avatar carlosantoniodasilva commented on May 27, 2024 1

@gagoit thanks for the feedback, glad to know the issue is elsewhere :)

@jwoodrow are you also using the same config gem? It sounds like this could be the culprit.

I tested a brand new app with devise (using this newly created 4-stable branch which contains tweaks for Rails 7.1), and everything appears to be working. If anyone would like to give that a try, let me know if you run into any issues.

from devise.

jwoodrow avatar jwoodrow commented on May 27, 2024 1

@carlosantoniodasilva We are indeed using the config gem, guessing the culprit must be there. Thanks to both of you for looking into this and finding the culprit. Now the question for me is, do I truly still need this gem :D

from devise.

carlosantoniodasilva avatar carlosantoniodasilva commented on May 27, 2024 1

Thanks for reporting back. I'll consider this one as closed then for now, but please report back if you run into anything else.

from devise.

gagoit avatar gagoit commented on May 27, 2024

@carlosantoniodasilva Thanks for your info.
I've checked the other gems in my project, and saw it's related to the config gem (more details here rails/rails#49457 and rubyconfig/config#342).

Summary:
Config gem uses deep_merge and DeepMerge's Hash monkey patch is not compatible with Rails 7.1 (see rails/rails#49457).
=> that make the behavior of deep_merge is changed in my project
=> Devise.with_options doesn't work correctly.

Sorry for making you confuse.

from devise.

saxxi avatar saxxi commented on May 27, 2024

Thanks for the heads up, for other users:

In order to update rails from 7.0 to 7.1 I had to manually upgrade config gem (from 4.1Β to 5.1 in my case) which stopped the error Invalid strategy trackable (was giving error for all strategies, not just trackable).

from devise.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.