Skip to content

bin/rails dbconsole does not work inside a Docker container for sqlite3 apps #52588

@jeromedalbert

Description

@jeromedalbert

Steps to reproduce

These repro steps deploy with the Fly.io CLI (but the issue happens with any deployment setup that uses the default Dockerfile):

rails new myapp -d sqlite3
fly launch --yes --generate-name
fly ssh console # This connects to a running Docker container in production

root@redacted:/rails# bin/rails dbconsole

Expected behavior

sqlite3 client should launch:

SQLite version 3.40.1 2022-12-28 14:03:47
Enter ".help" for usage hints.
sqlite>

Actual behavior

sqlite3 does not launch:

Couldn't find database client: sqlite3. Check your $PATH and try again.

System configuration

Rails version: 7.2.0

Ruby version: 3.3.2

Comments

To confirm that this is a general issue, I was also able to reproduce on a Rails Edge sqlite3 app deployed with Kamal by running kamal app exec -i bash (which connects to a Docker container using SSH).

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions