Updating Mastodon and Ruby, and renaming the publish buttons
Update Ruby
- Switch to the
mastodon
user:
- Navigate to the home directory:
- Update the
ruby-build
plugin:
1
| git -C .rbenv/plugins/ruby-build pull
|
- Install the desired Ruby version (e.g., 3.0.6) with
jemalloc
optimization:
1
| RUBY_CONFIGURE_OPTS=--with-jemalloc rbenv install 3.0.6
|
Update Files
- Switch to the
mastodon
user and open a shell:
- Navigate to the live directory and update the Mastodon codebase:
1
2
| cd /home/mastodon/live
git fetch && git checkout v4.1.2 --force
|
Refer to the release notes for additional commands: https://github.com/mastodon/mastodon/releases
- Install dependencies:
1
2
| bundle install
yarn install
|
- Apply database migrations:
1
| RAILS_ENV=production bundle exec rails db:migrate
|
- Replace the text for the “Publish” button:
1
2
| sed -in s/Veröffentlichen/Tröt/g app/javascript/mastodon/locales/*json
sed -in s/Publish/Toot/g app/javascript/mastodon/locales/*json
|
- Recompile the assets:
1
| RAILS_ENV=production bundle exec rails assets:precompile
|
Restart Services
As the root user, restart the Mastodon services:
1
| systemctl restart mastodon-*.service
|