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

SystemStackError: stack level too deep (Module#prepend) #89

Open
plantoeat opened this issue Jun 21, 2023 · 0 comments
Open

SystemStackError: stack level too deep (Module#prepend) #89

plantoeat opened this issue Jun 21, 2023 · 0 comments

Comments

@plantoeat
Copy link

We are getting a SystemStackError: stack level too deep with the strong_migrations gem installed.

/Users/me/.rbenv/versions/2.6.8/lib/ruby/gems/2.6.0/bundler/gems/departure-b7187bcf0061/lib/departure/migration.rb:60:in `migrate'
/Users/me/.rbenv/versions/2.6.8/lib/ruby/gems/2.6.0/gems/strong_migrations-1.4.4/lib/strong_migrations/migration.rb:5:in `migrate'
/Users/me/.rbenv/versions/2.6.8/lib/ruby/gems/2.6.0/bundler/gems/departure-b7187bcf0061/lib/departure/migration.rb:60:in `migrate'
/Users/me/.rbenv/versions/2.6.8/lib/ruby/gems/2.6.0/gems/strong_migrations-1.4.4/lib/strong_migrations/migration.rb:5:in `migrate'
/Users/me/.rbenv/versions/2.6.8/lib/ruby/gems/2.6.0/bundler/gems/departure-b7187bcf0061/lib/departure/migration.rb:60:in `migrate'
/Users/me/.rbenv/versions/2.6.8/lib/ruby/gems/2.6.0/gems/strong_migrations-1.4.4/lib/strong_migrations/migration.rb:5:in `migrate'
/Users/me/.rbenv/versions/2.6.8/lib/ruby/gems/2.6.0/gems/activerecord-6.1.7.3/lib/active_record/migration.rb:1037:in `migrate'
      # departure/migration.rb:21
      alias_method :active_record_migrate, :migrate
      remove_method :migrate
    def migrate(direction)
      if uses_departure?
        departure_migrate(direction)
      else
        reconnect_without_percona
        active_record_migrate(direction) # departure/migration.rb:60
      end
    end

And I received this message from the creator of strong_migrations. "I looked into this for another two gems a while back, and the (older) alias_method pattern isn't compatible with Module#prepend. Updating departure to use Module#prepend should fix it."

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

1 participant