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

APP_PATH redefined #174

Open
paneer-tikka opened this issue Jun 9, 2022 · 1 comment
Open

APP_PATH redefined #174

paneer-tikka opened this issue Jun 9, 2022 · 1 comment

Comments

@paneer-tikka
Copy link

Since this gem (re)defines APP_PATH, we get the following warning when starting rails.
/usr/local/bundle/bundler/gems/standalone-migrations-51197b69f14d/lib/standalone_migrations.rb:13: warning: already initialized constant APP_PATH bin/rails:2: warning: previous definition of APP_PATH was here
We were ignoring this until we realised that it caused issues with other gems (in particular doorkeeper) which assumed a different APP_PATH while generating files.
We were able to work around it by commenting it out temporarily, but is there a better way to fix this? Any suggestions? Would be happy to raise a PR if we can.

@rpiotaix-tc
Copy link

rpiotaix-tc commented Jun 14, 2022

I'm not sure about this, but isn't the standalone_migration gem made to be able to use active_record migrations and commands without rails?

EDIT: Yes it is: Rails migrations in non-Rails (and non Ruby) projects.
Is there a reason for you to use the gem in a Rails project, then? If not, it would be best for you to just remove the dependency to the standalone_migration gem and let Rails do everything :)

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