3 months ago
Hello,
I'm trying to run a rails app with a SQlite database. I've set up a volume as described in the guides, but the data keeps being overwritten every time I deploy. What am I doing wrong here?
1 Replies
3 months ago
It sounds like you might have your volume mount setup to point at the wrong location / your app setup to the database in the wrong spot (either or, really).
In my experience, the best way to verify this is to use Railway's SSH feature to "ssh" into the container and confirm that the SQLite database is there.
Here's two ways to do that. You'll just need the CLI installed:
From the Dashboard (easiest):
Navigate to your project and select your Rails service
Right-click on the service and select "Copy SSH Command"
Paste and run the command in your terminal
Or manually:
railway ssh --project=<PROJECT_ID> --environment=<ENVIRONMENT_ID> --service=<SERVICE_ID>Or if you've already linked your project locally:
railway sshOnce connected, check your volume mount path:
ls -la /path/to/your/mount/point