I’m trying to deploy an existing Rails app, but I keep getting the error:
instance refused connection. is your app listening on 0.0.0.0:3000? make sure it is not only listening on 127.0.0.1 (hint: look at your startup logs, servers often print the address they are listening on)
I suspect this will be something simple—like a missing environment variable—but how do I see the appropriate logs? I’m using fly logs to get that error message but that doesn’t appear to show me the Rails logs. How might I find out what is breaking the deployment?
I managed to get some extra info by installing the fly.io-rails gem. It’s been a far from seamless experience, though. Still can’t get this app deployed
Without being able to see your application or know what you’ve tried, it is hard to help you. Existing Rails Apps · Fly Docs contains more information on getting logs; in particular check out the recommendations for seeing the logs from the dashboard.
Running the following commands will get you an absolute minimum app up and running:
rails new demo --minimal
cd demo
echo 'Rails.application.routes.draw { root "rails/welcome#index" }' > config/routes.rb
fly launch
fly deploy
Accept the defaults on launch for this app.
How is what you are trying to do different than this?