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

Starting ruby-lsp-rails fails if database doesn't exist #516

Closed
andyw8 opened this issue Nov 7, 2024 · 0 comments · Fixed by #517
Closed

Starting ruby-lsp-rails fails if database doesn't exist #516

andyw8 opened this issue Nov 7, 2024 · 0 comments · Fixed by #517

Comments

@andyw8
Copy link
Contributor

andyw8 commented Nov 7, 2024

In #503 we added a check for pending migrations when starting ruby-lsp-rails.

If the database doesn't exist, this results in a failure which causes Ruby LSP to stop responding.

On code-db (an internal Shopify app) I can reproduce by running rake db:drop then starting Ruby LSP.

2024-11-07 10:00:53.844 [info] (code-db) Request  failed:

2024-11-07 10:00:53.844 [info] (code-db) /Users/andyw8/.gem/ruby/3.3.1/gems/activerecord-7.2.2/lib/active_record/connection_adapters/trilogy_adapter.rb:34:in `rescue in new_client': We could not find your database: code_db_development. Available database configurations can be found in config/database.yml. (ActiveRecord::NoDatabaseError)
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.

1 participant