R

Railway

βœ‹ο½œhelp

Join Server

"Database URL cannot be empty" error on CLI

Ddwaynemac3/18/2023
Today I started getting error "Database URL cannot be empty" when running:

railway run rails c
Ddwaynemac3/18/2023
my project ID is 1e715dda-f769-4167-bae5-3c58d685441c
Ddwaynemac3/18/2023
my instance is running ok for the webserver but i can't run console on it
Bbrody3/18/2023
what os?
Bbrody3/18/2023
and have you ran both railway link and railway service inside of that project folder?
Ddwaynemac3/18/2023
macOS
Ddwaynemac3/18/2023
railway run was working a few days ago.
Ddwaynemac3/18/2023
i did run railway service
Ddwaynemac3/18/2023
'railway run --service web rails c' didnt work either
Bbrody3/18/2023
did any of railway login, railway link, or railway service give you any errors?
Ddwaynemac3/18/2023
mmm, not really. i can try to logout and re-login
Ddwaynemac3/18/2023
no errors on login
Bbrody3/18/2023
not really? I think it was a yes or no question lol
Ddwaynemac3/18/2023
aand after logout and re-login CLI still same error when running 'railway run rails c'
Ddwaynemac3/18/2023
sorry. english not my native language.
NO, no errors on logout and login
Bbrody3/18/2023
okay what about the other commands I listed, any errors with them?
Ddwaynemac3/18/2023
they all work ok
Ddwaynemac3/18/2023
but dont resolve the issue
Bbrody3/18/2023
right okay
Bbrody3/18/2023
can you run railway shell and then run env
Bbrody3/18/2023
lmao no
Ddwaynemac3/18/2023
sorry, wout run
Ddwaynemac3/18/2023
retrying
Bbrody3/18/2023
railway shell
hit enter
env
Bbrody3/18/2023
does the database url variable show up?
Ddwaynemac3/18/2023
when running railway shell it thinks for a while and nothing happens
Ddwaynemac3/18/2023
is railwayapp 3.0.1
the latest?
Bbrody3/18/2023
no
Ddwaynemac3/18/2023
i'll try updating
Bbrody3/18/2023
yeah but also try listening to what I'm saying
Ddwaynemac3/18/2023
railway shell?? i did it and it didnt work.
Ddwaynemac3/18/2023
i told you here
Bbrody3/18/2023
close that terminal now

open a new terminal in the project

run railway shell

hit enter

run env

check if the printed environment variables contain the database url
Ddwaynemac3/18/2023
still getting this problem on the new terminal
Bbrody3/18/2023
screenshot please
Ddwaynemac3/18/2023
there is a screenshot in the mentioned message. but i'll take a new one
Bbrody3/18/2023
that screenshot you already sent shows that you didn't do what I'm asking
Ddwaynemac3/18/2023
Bbrody3/18/2023
please carefully read over this message
Bbrody3/18/2023
^
Ddwaynemac3/18/2023
aah, no prompt will come after railway shell
Ddwaynemac3/18/2023
got it
Bbrody3/18/2023
what do you mean no prompt? there's a white rectangle, that's the prompt
Ddwaynemac3/18/2023
sure, sorry
Ddwaynemac3/18/2023
when running 'env'
among all variables this appears:

DATABASE_URL=
Bbrody3/18/2023
there we go
Bbrody3/18/2023
have you setup the references?
Ddwaynemac3/18/2023
not sure. as i said, it's been working until now.
Bbrody3/18/2023
you're a beta tester
Ddwaynemac3/18/2023
you mean the new variables references for plugin that where announced on the last changelog?
Bbrody3/18/2023
yes
Bbrody3/18/2023
did you watch the video where Greg explained it all
Ddwaynemac3/18/2023
i didnt configure it manually no.
Ddwaynemac3/18/2023
no
Bbrody3/18/2023
please watch the video
Ddwaynemac3/18/2023
ah, yes
Ddwaynemac3/18/2023
that video yes
Ddwaynemac3/18/2023
Ddwaynemac3/18/2023
but on the UI it seems to be ok
Bbrody3/18/2023
normally I would refrain from asking you to go through all the above steps and just test it myself, but my power is out and I'm on mobile
Bbrody3/18/2023
so once I'm able to get back on the computer, I will check if I can replicate this issue and if I can I will bring it up to the team
UUUnknown User3/18/2023
Message Not Public
Sign In & Join Server To View
Ddwaynemac3/18/2023
running "railway variables" returns this
Ddwaynemac3/18/2023
trying
railway run env
now
Ddwaynemac3/18/2023
DATABASE_URL is blank in "railway run env"
UUUnknown User3/18/2023
Message Not Public
Sign In & Join Server To View
Ddwaynemac3/18/2023
yep
UUUnknown User3/18/2023
Message Not Public
Sign In & Join Server To View
Ddwaynemac3/18/2023
railway --version

railwayapp 3.0.1
UUUnknown User3/18/2023
2 Messages Not Public
Sign In & Join Server To View
Ddwaynemac3/18/2023
aaah, maybe its related to the brew install rlwy
Ddwaynemac3/18/2023
how do I run rlwy ?
UUUnknown User3/18/2023
Message Not Public
Sign In & Join Server To View
Ddwaynemac3/18/2023
oh, ok
Ddwaynemac3/18/2023
best install source?
UUUnknown User3/18/2023
Message Not Public
Sign In & Join Server To View
Ddwaynemac3/18/2023
i'll try that
Ddwaynemac3/18/2023
ok, running
railway --version
railwayapp 3.0.13
now
Ddwaynemac3/18/2023
aaand worked!
Ddwaynemac3/18/2023
thanks
UUUnknown User3/18/2023
4 Messages Not Public
Sign In & Join Server To View
Ddwaynemac3/18/2023
appreaciated
Ddwaynemac3/18/2023
i'm good now. getting back to work! πŸ˜„
Ddwaynemac3/18/2023
thanks for the help
UUUnknown User3/20/2023
2 Messages Not Public
Sign In & Join Server To View