Diesel does not work on railway
Diesel is a rust ORM, i need to run the migrations on railway before starting the app, but the CLI doesnt start
nixpacks.toml:
154 Replies
@IgnisDa
donβt ping random people lol
ah alright
but can you help me
can you send the full build logs
ideally the diesel binary should be statically linked
how do i do that
oh hold on
whats in
marketplace
its a svelte app
why is that bundled with rust?
its the frontend
you should deploy those as two different services ideally
i want the frontend and api to have the same origin
bcs otherwise it can generate CORS problems
the issue is nixpacks rn does not support multiple providers
(its in the works)
we can probably monkeypatch it tho
no
i just build the svelte app into static html
and rocket serves it
yeah, but nixpacks doesnt support node + rust
for autodetect
we need to manually tell it that
but the that's not the problem
the problem is that diesel_cli doesnt start
ye one sec
it needs a library that idk how to install
i tried everything i could
other question, does railway sync the DATABASE_URL and REDIS_URL variables from the database services?
try that for nixpacks.toml
... means what?
thought it was a place holder
wdym
"..." on the packages
oh that means extend the existing nixpacks config
so nixpacks automatically detects stuff
and we want to add to that
they should definitely change that
i agree
i really thought it was a place holder
can you open an issue on https://github.com/railwayapp/nixpacks
GitHub
GitHub - railwayapp/nixpacks: App source + Nix packages + Docker = ...
App source + Nix packages + Docker = Image. Contribute to railwayapp/nixpacks development by creating an account on GitHub.
like , keep what you had and add this
i'll pick it up sometime today
they can add a property like, disable-default-packages
that would make much more sense
ye, would be great if you can leave your feedback on an issue in the repo
that way its tracked and can be implemented
it would break a lot of projects though
or maybe not
it can just print ... is deprecated, default packages are on by default, you can disable the default packages by enabling X property
could be an additional syntax
π€lets hope this works
wtf
/app/.nixpacks/rust-toolchain.toml: No such file or directory
oh
we are here
did you guys fix le issue?
is is unfortunately very relatable
#8 25.81 error: opening file '/app/.nixpacks/rust-toolchain': No such file or directory
diesel is so bad idk why people still use it π
what are the alternatives
i can migrate now
my project is not that big
try that lol
prisma-client-rust
wayyyy better
i only have 2 tables
so shoudnt be too hard
actually its like
super easy
just run
cargo prisma db pull
it wil autogen the schema from ur dbrust prisma
documentation url?
i though prisma only worked on js
theres a rust version
i actually acidently spoke to him this week, i had no idea . nice guy
he likedhubert
how do you have that theme?
is it a mod?
nu
amoled dark theme on mobile
you should turn it on RN
smh android user
i like that more
like what more?
the theme
ohh
yea turn it on!
i hate gray backgrounds
me to
the sky is always grey over here
ur wifi icon reminded me i need to call xfinity and yell at them
scammers
record the phonecall
nah imma get doxxed π
lol
already happend
your hoodie is on its way
π
π³
just block the f*cking number
LOOOL
nono you see
i pay for 300mbps
they give me 100
sucker
sucks to suck
they refuse to run a fiber line down here
on portugal you can have a 1gbps internet by 38β¬ on WOO
meanwhile the neighbors with their fancy synchronous gigabit fiber
im so mad
portuagal is chill
stay mad + ratio
+ no hoodie
i'm literally in the end of the world
i still have fiber
same
literally same
BRUH THATS WHAT I MEAN
literally everyone and their mother has fiber
the gov pays massive subsidys to do rural areas beacuse otherwise it will never get done so they leave the citys alone
common american L
common neb W
the cities have fiber, the cows have fiber, i dont have fiber
Android is not that bad cmon
nah i was trolling
android is chill
the words look funny? how do you read it
lanterna
why not just say light
or torch
π
flash light
british people being british
somone get the gif of the blue man in the apple store
its in portuguese
i'm from portugal
henery the navigator π
lool
i didnt see bcs it was still loading
common portugeess internet
i'm using wifi
the speeds may be fast but the ping
finn.
yes
you live across the sea
the English channel
the Atlantic Ocean
oh com on, we own that aswell
me when the brits decide to dig under the ocean π
we killed the topic and put it off
sorry
my bad
yeah just use prisma it fixes everything
so yea use prisma
rut
tbh
also are you running embeded migrations
or manually running them?
hes running migrate on deploy
ahh i see
eventuall migrations like that will take down your app though
at a big enough scale ig
why
who table lock to apply the migrations
whole
oh
thats a problem for like massive apps
he has two tables
ye
idt we have a problem
your correct
but what iff
giving a presentation on oline schema migrations on tuseday
very cool
online*
i havent even started it tho
what a bozo
whyyy
i really have to create a cli bin on purpose
yeah its weird
does prisma use libpq-dev?
i'm using postgres
That is really unclear
We should. Aka it automatically inherit and then have an opinion to remove
Option
no
its native rust
Does this work for diesel neb?
@Finn is it bad to commit the prisma.rs file?
ughh
whats in it? @Tiaguinho
It's generated by Prisma, it's like diesel's schema.rs, the difference is that is generated from a Prisma file instead of the migrations
You need to
no
you run cargo prisma generate on deployment
you dont commit it
Bro what are you talking about???
You depend on the things it generates in your code
How you gonna do that unless you commit it?
Smart one
my boy do you commit
node_modules
on nodejsthat is completely different?
CI will fail unless you commit it or generate it in CI, thats stupid
you generate it in CI yeah
thats how it works in js as well
you never commit generated code
thats stupid
not true
???
where on the docs does it say gitignore it
GitHub
prisma-client-rust/examples/rocket at main Β· Brendonovich/prisma-cl...
Type-safe database access for Rust. Contribute to Brendonovich/prisma-client-rust development by creating an account on GitHub.
i dont see one on any of the examples
where is gitignore
?
GitHub
prisma-client-rust/ci.yaml at main Β· Brendonovich/prisma-client-rust
Type-safe database access for Rust. Contribute to Brendonovich/prisma-client-rust development by creating an account on GitHub.
look its generated in CI
i see no generate
prisma db push runs generate
mmm
i mean
it can be useful to not gitignore some times
How do I do a create or update in Prisma?
I want to create if it doesn't not exist, but if it exists I want to update
upsert