事前にapt-get update && apt-get upgrade && apt-get autoremove
しておいてからの
$ sudo do-release-update -d
でUbuntu自体は22.04に上がる。
上がるタイミングで設定ファイルに変更があったやつどうする?更新する?と聞かれるが全部No。
よくわからない。resolv.confがなんか悪さしてそうということしかわからない。
とりあえず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は無事動作。