I have a postgres installation (9.5) and was successfully able to connect to it by using the postgres crate. i was also successfully able to use diesel with sqlite. but when i try to use diesel-cli to setup a database i allways get the error "Unable to open the database file".
I'm using
diesel 0.12.0
rustc 1.18.0-nightly (5e122f59b 2017-04-01)
psql (9.5.6)
i tried many combinations to set DATABASE_URL like
echo DATABASE_URL=postgres://planb:*@localhost/planb > .env
diesel setup --database-url postgres://planb:*@localhost/planb
with or without quotes, port etc. tried to switch of ssl on postgres too. postgresql log gives no output.
a simple
let conn = Connection::connect("postgresql://planb:*@localhost", TlsMode::None).unwrap();
using the postgres crate(0.14.0) works without problems
i cloned this repository and build redis-cli by myself.(had to deactivate sqlite feature which seems to be broken) and now it works.
i installed the non working version with cargo install diesel_cli
strange. but it now works for me.
Same here...
I ran cargo install --force diesel_cli
again and the error disappeared.
Maybe it is worthwhile noting that I installed diesel_cli
prior to adding diesel
to any Cargo.toml
.
I am also running postgres 9.5.5
@sgrif I'm pretty much sure that this issue is stale, maybe it's better to close it?
Yeah, this appears to have been a situation where diesel-cli
didn't have the right features enabled. The error message has been improved in that case, and regardless we don't do support on the issues tracker. If anyone feels I've missed an actual bug here, or has a different bug to report, please open a new issue.
Most helpful comment
Same here...
I ran
cargo install --force diesel_cli
again and the error disappeared.Maybe it is worthwhile noting that I installed
diesel_cli
prior to addingdiesel
to anyCargo.toml
.I am also running postgres 9.5.5