Error message · Ruby on Rails sites in production

“We're sorry, but something went wrong. If you are the application owner check the logs for more information.”

Rails raised an exception while handling the request and, because the app runs in production mode, showed its generic 500 page (public/500.html) instead of the details. The details are in the production log. Often it's one page or one action, not the whole site.

Is your site showing it right now?

The free scan loads your page like a visitor and checks for this message, plus broken links, script errors and phone layout. It also walks your signup, booking or contact form, without sending anything.

​

Free, no signup. Usually done in about a minute.

Why it happens

  • A database change that hasn't been applied: a migration pending after a deploy
  • A missing secret or environment variable (SECRET_KEY_BASE, a database URL, an API key)
  • Assets weren't precompiled, so a page that references them fails
  • A gem or Ruby version change the server doesn't have
  • The database is unreachable or out of connections

How to fix it

  1. Read log/production.log

    On the server (or with your host's log viewer), look at the last lines of log/production.log. The exception's first line and the file it names tell you the cause.

  2. Run pending migrations

    If the log mentions ActiveRecord::PendingMigrationError or a missing column, run RAILS_ENV=production bin/rails db:migrate and restart the app.

  3. Check secrets and environment variables

    A missing SECRET_KEY_BASE or database setting fails every request. Set it in the server's environment or credentials, then restart.

  4. Precompile assets

    If the error names an asset, run RAILS_ENV=production bin/rails assets:precompile and restart. Most deploy tools do this; a manual deploy may have skipped it.

  5. Restart the app server

    After any fix, restart Puma or Passenger (or redeploy) so the new code and settings load.

Questions

Can I see the error without the server?

Not from the page itself: Rails hides it on purpose. An error tracker (Sentry, Honeybadger, Rollbar) emails you each exception with the request that caused it.

Only one page shows it

Then the exception is in that controller action or its view. The production log entry for the request names the line.

Can Page Canary tell me if this comes back?

Yes. Page Canary checks your key pages every day for this message and others like it, confirms it on a second check, and emails you with the fix. One site is free.

Other error messages