お知らせ
現在サイトのリニューアル作業中のため、表示が崩れているページが存在することがあります。
ハマったので残しておく。
git remote -vの状態が以下の通りで、origin/mainが本番運用ブランチ。
mastodon        https://github.com/mastodon/mastodon.git (fetch)
mastodon        https://github.com/mastodon/mastodon.git (push)
origin  https://github.com/Lycolia/lycodon.git (fetch)
origin  https://github.com/Lycolia/lycodon.git (push)
git checkout -b merge-latest
git fech mastodon
git merge mastodon/main
sudo su - mastodon
# Rubyのアップデート用
cd ~/.rbenv/plugins/ruby-build
git pull
RUBY_CONFIGURE_OPTS=--with-jemalloc rbenv install
cd ~/live
# install
bundle install
yarn install
# DBがアカンことがあるので叩いておく
RAILS_ENV=production bundle exec rails db:migrate
# いつものリビルド
RAILS_ENV=production bundle exec rails assets:clobber
RAILS_ENV=production bundle exec rails assets:precompile
exit
# 再起動
sudo systemctl restart mastodon-web mastodon-sidekiq mastodon-streaming
git pushしてGitHub上で自分のところのmainにマージする。デフォルトでは本家に向くので注意ジャーナルを見てエラー原因を特定する。新規要素がらみのパラメーターが出てたらDBが怪しいのでRAILS_ENV=production bundle exec rails db:migrateで直る可能性がある。
sudo journalctl -u mastodon-web -f
以下のコマンドを叩いてruby-buildを更新するといける
cd  "$(rbenv root)"/plugins/ruby-build
git pull