[Original title: “No Rakefile found”, cannot run rails db:seed
command and cannot run console]
I have successfully deployed an existing Rails app with Fly.
It’s a Rails 7 app, I have kept the Dockerfile
and the fly.toml
but removed the Node/yarn parts in them as I don’t use Node (importmaps instead)
When I try to run fly ssh console -C "/app/bin/rails console"
, most of the time the process hangs and I just cannot access the console, sometimes it takes very long, I access the prompt but trying to write anything kicks me out.
I also usually get Out of memory: Killed process 515 (bundle) total-vm:246060kB, anon-rss:106508kB, file-rss:0kB, shmem-rss:0kB, UID:0 pgtables:496kB oom_score_adj:0
, my Rails app is extremely light but it seems like I cannot really use it with free tier.
When I try to run fly ssh console -C "/app/bin/rails db:seed"
, I get this error:
rails aborted!
No Rakefile found (looking for: rakefile, Rakefile, rakefile.rb, Rakefile.rb)
but I have a Rakefile in my project.
Edit: By entering the image and executing bundle
from within, I managed to run the seed:
$> fly ssh console
# cd /app
# bundle exec rails db:seed
Anyone had the same issues and solved them?