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

rails db:system:change command fails via spring #678

Closed
inayuky opened this issue May 28, 2022 · 2 comments · Fixed by #679
Closed

rails db:system:change command fails via spring #678

inayuky opened this issue May 28, 2022 · 2 comments · Fixed by #679

Comments

@inayuky
Copy link
Contributor

inayuky commented May 28, 2022

As I reported at rails/rails#34710 (comment), rails db:system:change command fails only via spring.

% rails db:system:change --to=postgresql
Running via Spring preloader in process 15906
invalid option: --to=postgresql

Probably due to the following spring update.

b85f41b

This forces to call rake for all db commands, but exceptionally the new db:system:change command is not a rake task.

% rake db:system:change --to=postgresql
invalid option: --to=postgresql

The following simple fix works fine in my environment.
How about this fix?

        elsif command_name&.start_with?("db:") && !command_name.start_with?("db:system")
@ghiculescu
Copy link
Member

That fix looks good to me too, want to make a PR?

@inayuky
Copy link
Contributor Author

inayuky commented May 28, 2022

@ghiculescu Thank you for your reply. Yes, I will make PR.

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

Successfully merging a pull request may close this issue.

2 participants