Since that question was posted, the Dockerfile produced by fly launch has new instructions to add cd
commands to all of the files in the bin
directory, so the following will now work:
fly ssh console -C '/app/bin/rails console'
If you want to run a different command (or set of commands) what you will need in general is to create a script that does a cd followed by the desired command(s), and then run that script.