Application Failed to Respond – Rails 8 Solid Stack
vicramon
PROOP

a month ago

Hi, I'm getting this error when trying to visit the public url for my Rails 8 + solid stack application:

Application failed to respond

This error appears to be caused by the application.

If this is your project, check out your deploy logs to see what went wrong. Refer to our docs on Fixing Common Errors for help, or reach out over our Help Station.

If you are a visitor, please contact the application owner or try again later.

Request ID:

OcJv9RX4S0WCFe06n6XIxQ

This is my start command:

bin/rails db:create db:migrate && bin/rails s -p ${PORT:-3000} -b 0.0.0.0

And I have the target port set to "3000".

I think I followed all the instructions properly but it's not working, please help, thanks!

Solved$20 Bounty

Pinned Solution

domehane
FREE

a month ago

good, for the port, 3000 is totally fine , 80 is the standard http port but railway's proxy handles that mapping for you automatically, so either works the same way externally

18 Replies

Railway
BOT

a month ago

This question appears to be about your application code rather than the Railway platform, which is outside the scope of what we can help with.


Status changed to Awaiting User Response Railway about 1 month ago


Status changed to Awaiting Railway Response Railway about 1 month ago


vicramon
PROOP

a month ago

Railway team, if you can't provide any support here, I will have to cancel my subscription and move to Render.


Status changed to Open Railway about 1 month ago


Try setting a PORT variable in your service to an arbitrary number (eg, 9000), and map your URL to that port.

Make sure to redeploy after configuring your service.


vicramon
PROOP

a month ago

Thanks for tip... just tried it, no luck though. Any other ideas?


Have you tried hardcoding the 3000 instead of using ${PORT:-3000}?


domehane
FREE

a month ago

Hello vicramon, can you share your deploy logs?


0x5b62656e5d

Have you tried hardcoding the 3000 instead of using `${PORT:-3000}`?

vicramon
PROOP

a month ago

Just tried that, no luck


domehane

Hello **vicramon**, can you share your deploy logs?

vicramon
PROOP

a month ago

Yeah, no obvious issues. Attached build and deploy logs.


domehane
FREE

a month ago

okay so the build is clean and migrations ran fine, i think the issue is that your app is using thruster (i can see thruster 0.1.19 was installed), which is a proxy that wraps puma , it handles the port itself so your start command bin/rails s -p ${PORT:-3000} is likely conflicting with how thruster expects to manage the port

try changing your start command to:

bundle exec thrust bin/rails server

and make sure your target port in railway matches the PORT variable, thruster will handle binding to it automatically

Hope this help you :)


vicramon
PROOP

a month ago

Good catch, yes I am using thruster 0.1.19.

Ok, I tried that but still getting the same error. Let me know if you have any other suggestions.


domehane
FREE

a month ago

can you share your deploy logs after trying that command?


vicramon
PROOP

a month ago

2026-04-07T19:54:47.088558887Z [inf]  Starting Container
2026-04-07T19:54:47.832108245Z [err]  Database 'railway' already exists
2026-04-07T19:54:47.832173345Z [err]  Database 'railway' already exists
2026-04-07T19:54:47.910153280Z [err]  Database 'railway' already exists
2026-04-07T19:54:48.033544949Z [err]  Database 'railway' already exists

domehane
FREE

a month ago

the logs got cut off right after the db step?


domehane
FREE

a month ago

i can't see if thruster/puma actually started or what error happened after, can you scroll down and share the rest of the deploy logs after those database lines?


domehane
FREE

a month ago

?


vicramon
PROOP

a month ago

Ok, I got it working, the fact that the logs stopped was the clue, something was off with the Dockerfile. Some of the logs showed "Stopping Container" but that wasn't included with the export or visible in the summary, I had to go into the log screen to see it.

I removed the start command, so then it uses CMD from dockerfile, which was already correct by default from rails generate:

CMD ["./bin/thrust", "./bin/rails", "server"]

I believe the issue was the default bin/docker-entrypont file.

Before:

#!/bin/bash -e

# If running the rails server then create or migrate existing database
if [ "${@: -2:1}" == "./bin/rails" ] && [ "${@: -1:1}" == "server" ]; then
  ./bin/rails db:prepare
fi

exec "${@}"

After:

#!/bin/bash
set -e

# This check looks for "rails server" anywhere in the command arguments
if [[ "$*" == *"rails server"* ]]; then
  echo "docker-entrypoint: Running database setup..."

  # Try to create the database (fails silently if it exists)
  ./bin/rails db:create || echo "Database already exists, skipping create."

  # Run migrations
  ./bin/rails db:migrate

  echo "Database setup complete."
fi

exec "${@}"

Now it's working. No PORT variable needed, and I set the connection port to 80 (3000 also works but I assume 80 is the better one to use here).


domehane
FREE

a month ago

good, for the port, 3000 is totally fine , 80 is the standard http port but railway's proxy handles that mapping for you automatically, so either works the same way externally


vicramon
PROOP

a month ago

@domehane (cc @railwaysupport) you should get the bounty since your help led to the fix, but my comment should be marked as the solution. Thanks again :)


Status changed to Solved sam-a about 1 month ago


Welcome!

Sign in to your Railway account to join the conversation.

Loading...