hi there, I have an error when trying to execute the command: fly ssh console -C "app/bin/rails console" I don't know what can happen help me please

fly  ssh console -C "app/bin/rails console"
        Connecting to f:1:d:a:::2... complete 
        fork/exec app/bin/rails: no such file or directory 
        Error ssh shell: wait: remote command exited without exit status or exit signal

can’t seem to find the way. I don’t know how I can find it, any suggestions on how to find the path.

I was waiting to access the production console.

Try with a starting /.

fly ssh console -C "/app/bin/rails console"

If your Rails app was launched on fly.io on or after 29 Jan 2023, the command you want is:

fly ssh console -C "rails/bin/rails console
1 Like

Thank you very much, although this command has not worked for me yet.

It doesn’t show me the console, it keeps loading

fly ssh console -C "rails/bin/rails console"
Connecting to f:1:d:a7:cf:e:2f:... complete
Loading production environment (Rails
Switch to inspect mode.

The next step is to look at the logs, for best results select Monitoring from the dashboard.

The most common error you will find is that you are out of memory. Rails servers and Rails consoles both take a lot of memory, and if you are using the free tier, you will often run out when you try to run both together. Out of Memory contains a number of suggestions.

Hey @maymine, we recently updated flyctl to behave more like the standard OpenSSH client. Since you’re specifying an explicit command (with -C) and trying to run an interactive console, I think you will need to use the --pty option now: fly ssh console --pty -C "rails/bin/rails console". This tells the SSH server to run the program in a virtual terminal, which (like the standard ssh command) won’t be done by default when you provide an explicit command.

If this is the problem, then I’m so sorry that you got caught by this change!—it’s just that many other people expected it to work like OpenSSH and ran into problems when it didn’t.

(It looks like there are some docs that are out of date, so I’m going to go update those now.)


Yup, that did the trick for me, thanks!

thankful with you

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.