You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Chapter 2.5 Working with a Database: Injecting the database connection - fails accourding to trait bound shuttle_shared_db::Postgres: ResourceInputBuilder is not satisfied
#25
I´m sorry for opening up a issue, but i can´t help me out.
As I was following the instructions from your Tutorial i ran into this error. I checked it multiple times and can say i exactly followed the instructions.
error[E0277]: the trait bound shuttle_shared_db::Postgres: ResourceInputBuilderis not satisfied --> api/shuttle/src/main.rs:11:7 #[shuttle_shared_db::Postgres()] pool: sqlx::PgPool, ^^^^^^^^^^^^^^^^^^^^^^^^^^^ the traitResourceInputBuilderis not implemented forshuttle_shared_db::Postgres`
error[E0599]: no function or associated item named default found for struct shuttle_shared_db::Postgres in the current scope
--> api/shuttle/src/main.rs:9:1
#[shuttle_runtime::main]
|^^^^^^^^^^^^^^^^^^^^^^^^ function or associated item not found in Postgres
`
As an absolute beginner i would be very thankfull for a solution to this problem, i can´t figure out myself.
The text was updated successfully, but these errors were encountered:
philipp10348r574kdfje
changed the title
Injecting the database connection - fails accourding to trait bound shuttle_shared_db::Postgres: ResourceInputBuilder is not satisfied
Chapter 2.5 Working with a Database Injecting the database connection - fails accourding to trait bound shuttle_shared_db::Postgres: ResourceInputBuilder is not satisfied
Mar 12, 2024
philipp10348r574kdfje
changed the title
Chapter 2.5 Working with a Database Injecting the database connection - fails accourding to trait bound shuttle_shared_db::Postgres: ResourceInputBuilder is not satisfied
Chapter 2.5 Working with a Database: Injecting the database connection - fails accourding to trait bound shuttle_shared_db::Postgres: ResourceInputBuilder is not satisfied
Mar 12, 2024
I had the same issue. By looking at the shuttle repository : https://github.com/shuttle-hq/shuttle-examples/blob/main/actix-web/postgres/Cargo.toml
I found that you should replace the lines to paste in the api/shuttle/Cargo.toml file ( shuttle-shared-db = { version = "0.36.0", features = ["postgres"] }
sqlx = { version = "0.7", default-features = false, features = [
"tls-native-tls",
"macros",
"postgres",
"uuid",
"chrono",
"json",
] }), by those lines :
shuttle-shared-db = { version = "0.42.0", features = ["postgres", "sqlx"] }
sqlx = "0.7.1"
Hello :)
I´m sorry for opening up a issue, but i can´t help me out.
As I was following the instructions from your Tutorial i ran into this error. I checked it multiple times and can say i exactly followed the instructions.
error[E0277]: the trait bound
shuttle_shared_db::Postgres: ResourceInputBuilderis not satisfied --> api/shuttle/src/main.rs:11:7 #[shuttle_shared_db::Postgres()] pool: sqlx::PgPool, ^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait
ResourceInputBuilderis not implemented for
shuttle_shared_db::Postgres`error[E0599]: no function or associated item named
default
found for structshuttle_shared_db::Postgres
in the current scope--> api/shuttle/src/main.rs:9:1
#[shuttle_runtime::main]
|^^^^^^^^^^^^^^^^^^^^^^^^ function or associated item not found in
Postgres
`
As an absolute beginner i would be very thankfull for a solution to this problem, i can´t figure out myself.
The text was updated successfully, but these errors were encountered: