CLI commands return "No such file or directory (os error 2)"
I try to create superuser for my django build, but every command I try to run through CLI gives me the "No such file or directory (os error 2)" error. I have also tried to run it by specifying the "web" service I try to connect to, as you can see in the log below. Other shell commands, like take a while to process and eventually return the content of my local DIR.
The link works fine, as you can see from the status response. I can also browse the deployment logs for the "web" service in the project and the deployment itself went smoothly with no errors. The database connection and all the migrations are also done with no issues.
I run railwayapp 3.3.1 version and tried to reinstall it multiple times, but to no avail.
Project ID: 0c11419a-209d-4bd7-b55b-379f4a9c0fea
Any ideas what's wrong with the way I try to run it?
4 Replies
Project ID:
0c11419a-209d-4bd7-b55b-379f4a9c0fea
do you have python installed on your computer and is it available in PATH?
Your question gave me a clue what's going on here.
I thought that the 'run' command allows me to connect to the project env and run commands there, but in fact I run them locally, in the app directory, with the project env variables and have to deploy the changes made locally with "railway up" to update the project DB.
Thanks @Brody - your question put my thoughts on the right track (or railway, lol)!
common misconception, no worries, glad I was of help!