Skip to content

Instantly share code, notes, and snippets.

@crakaC
Created May 2, 2022 11:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save crakaC/6ede8ad70485b0c71118cfa5939a07b2 to your computer and use it in GitHub Desktop.
Save crakaC/6ede8ad70485b0c71118cfa5939a07b2 to your computer and use it in GitHub Desktop.
Mastodon用サーバーをUbuntu20.04からUbuntu22.04にアップデートしたときに踏んだものまとめ

事前にapt-get update && apt-get upgrade && apt-get autoremoveしておいてからの

$ sudo do-release-update -d

でUbuntu自体は22.04に上がる。

上がるタイミングで設定ファイルに変更があったやつどうする?更新する?と聞かれるが全部No。

Refused connection

よくわからない。resolv.confがなんか悪さしてそうということしかわからない。

Mastodonが立ち上がらない

とりあえずnode_modulesとvendor以下を吹き飛ばして

export RAILS_ENV=production
export PATH="/home/mastodon/.rbenv/shims:$PATH"

bundle config set --local deployment 'true'
bundle install

yarn install --pure-lockfile

bundle exec rails assets:clobber
bundle exec rails assets:precompile

してみた。bundle installで落ちた。 openssl(gem)がインストールできてないみたいだった。

まずはOpenSSL1.1.1をコンパイルしてインストール rbenv/ruby-build#1940 (comment)

bundlerでインストールするときにインストールしたOpenSSLの場所を指定

bundle config set --local deployment 'true'
bundle config build.openssl "--with-openssl-dir=/opt/openssl-1.1.1n/"
bundle install

これでMastodonは無事動作。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment