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

DB: no adapter for localhost #183

Open
dipzera opened this issue Aug 12, 2024 · 8 comments
Open

DB: no adapter for localhost #183

dipzera opened this issue Aug 12, 2024 · 8 comments

Comments

@dipzera
Copy link

dipzera commented Aug 12, 2024

Using WSL2, running a dockerized postgres database
Installed vim-dadbod using lazy, what am I doing wrong? 😴

image

image

@tpope
Copy link
Owner

tpope commented Aug 12, 2024

Is that the exact command you're running? Unless your password really is password, I'm guessing no, you ran a different command. And that's where your problem lies, because the command as-is shouldn't give that error.

@dipzera
Copy link
Author

dipzera commented Aug 12, 2024

Password indeed is password, it's a local db.

@dipzera
Copy link
Author

dipzera commented Aug 12, 2024

Removed, vim-dadbod-ui package and it works now, looks like it was conflicting with it.

@amns13
Copy link

amns13 commented Aug 12, 2024

This happened to me as well for postgres. And the resolution was also same. I had to remove vim-dadbod-ui package

@kristijanhusak
Copy link
Contributor

@dipzera @amns13 can you clarify how this conflicts with vim-dadbod-ui?

@amns13
Copy link

amns13 commented Aug 15, 2024

@kristijanhusak Sorry for late reply. Turns out I had missplled postgres as posgres while initially configuring. After cloning both repos locally and doing some debugging, I found out that I can't read/spell.

I noticed 1 weird behaviour though. :DBUI command was failing with the no adapters for posgres error message, which is expected. But, even :DB was failing even when provided with the correct uri. When I disabled dadbod-ui, :DB started to work. This is what led me to beleive that it may be some conflict with dbui extension

@dipzera You can check ~/.local/share/db_ui/connections.json to see whether you have added the proper initial url or not.

@Normanras
Copy link

Normanras commented Sep 9, 2024

@amns13 Thanks for the heads up on checking the connections file. I recently opened an issue on dadbod-ui because I was getting a similar "no apadtors" error but it was for no adaptors for https. I'm connecting to a remote aws db but the psql` command works perfectly.

If I remove dadbod-ui and just use this plugin, I get no connection errors, but also the expected behavior of dadbod doesn't work and I can't query my db. A little stumped by this....

Edit: And the answer was in connections.json. Clearing that our resolved the issue!

@dzintars
Copy link

Seen this error when I had faulty connection record in the ~/.local/share/db_ui/connections.json despite DB_UI_DEV ENV was correct.
Removed faulty record from config and it resolved this error.

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

6 participants