Unable to access rails console with hosted rails app

I’m running
fly ssh console --pty -C "/rails/bin/rails console"

To access the rails console of my app like I have many times before but now I’m getting

Charless-MBP:wherecanwedance-dw ogarocious$ fly ssh console --pty -C "/bin/rails console"
Connecting to fdaa:0:bd9e:a7b:cf99:aa84:4dd0:2... complete
fork/exec /bin/rails: no such file or directory
       Error: ssh shell: wait: remote command exited without exit status or exit signal

I’ve done this many times before and it always worked, I’m not sure what I’m missing to be able to ensure the directories are pointing to the right place

My fly.toml is:

# fly.toml app configuration file generated for wherecanwedance on 2023-05-26T21:23:51-05:00
# See https://fly.io/docs/reference/configuration/ for information about how to use this file.

app = "wherecanwedance"
primary_region = "dfw"
kill_signal = "SIGINT"
kill_timeout = "5s"

  auto_rollback = true

    BUILD_COMMAND = "bin/rails fly:build"
    SERVER_COMMAND = "bin/rails fly:server"

  release_command = "bin/rails fly:release"

  PORT = "8080"

  protocol = "tcp"
  internal_port = 8080
  processes = ["app"]

    port = 80
    handlers = ["http"]
    force_https = true

    port = 443
    handlers = ["tls", "http"]
    type = "connections"
    hard_limit = 25
    soft_limit = 20

    interval = "15s"
    timeout = "2s"
    grace_period = "1s"
    restart_limit = 0

  guest_path = "/app/public"

prefix = “/”

Any assistance is appreciated!

It looks like your Dockerfile may have been generated before 29 January 2023, and if so you want:

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

Thanks! That worked perfectly! I will save the command with this path!

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