New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
kamal exec rails console no such file or directory #728
Comments
Does the app run otherwise? It’s hard to tell if the “command not found” is coming from the host trying by to execute docker, or the container trying to execute bin/rails, but consider that it could be either. Ensure the first host defined is your rails app, and not an accessory or other image. Finally, I recall having issues in my windows days when a file would have Windows line endings (\r\n) being executed on a Linux host, similar to what you’ve described. You might try checking your files to make sure they are consistently ending with Linux endings, particularly the .ENV file. Actually, the more I think about how easy it would be to do this in your setup, and what effects line endings of \r\n would have in Linux, I think that’s the first thing you should do. Open your .env file in an editor that makes it easy to convert to Linux line endings, and then Good luck friend! |
The app works flawlessly otherwise. And if i run docker run -it --rm --env-file .kamal/env/roles/IMAGENAME.env COMPANYNAME/IMAGENAME:latest bin/rails c directly on the host, it works too |
@randohinn - if you try to run Or what happens if you re-use an existing container - |
This might be a kamal on windows powershell specific thing... Here is the output when trying to launch a console
And the dockerfile of this app
How do I get a working rails console?
The text was updated successfully, but these errors were encountered: