Skip to content

Commit cdca07c

Browse files
Spriteclaude
andcommitted
Add troubleshooting note for Rails console path error
Users may get "no such file or directory" when running the Rails console command if their app isn't in /rails or binstubs aren't configured. Added a callout with guidance on diagnosing and fixing the issue. Closes #2256 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent ee9b542 commit cdca07c

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

rails/the-basics/run-tasks-and-consoles.html.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ Then start using the console, but be careful! You're in a production environment
2121

2222
<div class="callout">The `--pty` flag tells the SSH server to run the command in a pseudo-terminal. You will generally need this only when running interactive commands, like the Rails console.</div>
2323

24+
<div class="callout">If you get a `no such file or directory` error, your app may not be installed in the `/rails` directory. SSH in with `fly ssh console` and check your app's location, then adjust the path accordingly. Apps built with the [dockerfile generator](https://github.com/fly-apps/dockerfile-rails) use `/rails` as the working directory by default. You may also need to [set up your binstubs](#rails-tasks) with `bin/rails generate dockerfile --bin-cd`.</div>
25+
2426
## Interactive shell
2527

2628
To access an interactive shell as the `root` user, run:

0 commit comments

Comments
 (0)