Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.
Sign upthe trait `diesel::connection::Connection` is not implemented for `diesel::PgConnection` #1441
Comments
This comment has been minimized.
|
You probably have multiple versions of diesel in your dependencies. Check that you're using the right version for r2d2 (it should be the same as the diesel one) and run cargo update. |
This comment has been minimized.
chillcaw
commented
Dec 29, 2017
|
Cargo.toml: diesel = { version = "1.0.0-rc1", features = ["postgres"] }
dotenv = "0.9.0"
diesel_codegen = { version = "0.16.0", features = ["postgres"] }
r2d2-diesel = "1.0.0-rc1"
r2d2 = "0.8.2" |
This comment has been minimized.
|
You shouldn't have |
This comment has been minimized.
chillcaw
commented
Dec 29, 2017
|
Ah cool, I will have to look through diesels docs, I have been going by rocket's docs. They must be slightly out of date. new Cargo.toml for people with the same problem: diesel = { version = "1.0.0-rc1", features = ["postgres"] }
dotenv = "0.9.0"
r2d2-diesel = "1.0.0-rc1"
r2d2 = "0.8.2" |
This comment has been minimized.
|
I should update the rocket example... |
chillcaw
closed this
Dec 29, 2017
This comment has been minimized.
chillcaw
commented
Dec 29, 2017
|
I have it working with my Rocket project: Rocket Template. |
chillcaw
referenced this issue
Dec 29, 2017
Closed
Proposal: Diesel documentation change in state.md #525
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
chillcaw commentedDec 29, 2017
•
edited
My code is as follows:
I don't understand why the error is even saying
diesel::PgConnection, since I'm usingdiesel::pg::PgConnection.