From 64a27d3f41491cf553e977967388a24c915c69d1 Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Tue, 15 Jan 2019 17:08:49 +0100 Subject: [PATCH] Update content/en/administration/troubleshooting.md --- content/en/administration/troubleshooting.md | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/content/en/administration/troubleshooting.md b/content/en/administration/troubleshooting.md index f79ec1fd..de272733 100644 --- a/content/en/administration/troubleshooting.md +++ b/content/en/administration/troubleshooting.md @@ -15,10 +15,14 @@ Specific details of server-side errors are *never* displayed to the public, as t Each response from Mastodon's web server carries a header with a unique request ID, which is also reflected in the logs. By inspecting the headers of the error page, you can easily find the corresponding stack trace in the log. -**After an upgrade to a newer version, some pages look weird with unstyled elements** +**After an upgrade to a newer version, some pages look weird, like they have unstyled elements. Why?** Check that you have run `RAILS_ENV=production bin/rails assets:precompile` after the upgrade, and restarted Mastodon's web process, because it looks like it's serving outdated stylesheets and scripts. It's also possible that the precompilation fails due to a lack of RAM, as webpack is unfortunately extremely memory-hungry. If that is the case, make sure you have some swap space assigned. Alternatively, it's possible to precompile the assets on a different machine, then copy over the `public/packs` directory. -**After an upgrade to a newer version, some requests fail and the logs show error messages about missing columns or tables** +**After an upgrade to a newer version, some requests fail and the logs show error messages about missing columns or tables. Why?** -Check that you have run `RAILS_ENV=production bin/rails db:migrate` after the upgrade, because it looks like Mastodon's code is accessing a newer or older database schema. \ No newline at end of file +Check that you have run `RAILS_ENV=production bin/rails db:migrate` after the upgrade, because it looks like Mastodon's code is accessing a newer or older database schema. If you are using PgBouncer, make sure this one command connects directly to PostgreSQL, as PgBouncer does not support the kind of table locks that are used within migrations. + +**I am trying to run a `tootctl` or `rake`/`rails` command, but all I get is an error about uninitialized constants. What's wrong?** + +Check that you are specifying the correct environment with `RAILS_ENV=production` before the command. By default, the environment is assumed to be development, so the code tries to load development-related gems. However, in production environments, we avoid installing those gems, and that's where the error comes from. \ No newline at end of file