1
0
hugo/content/blog/2021-05-09-mastodon.md
2024-04-23 22:21:26 +09:00

1.3 KiB

+++ date = "2021-05-09" tags = ["heroku","mastodon"] title = "mastodon v3.4.0をruby v3.0.1でdeployしてみた" slug = "mastodon" +++

mastodon v3.4.0のpre-verがmasterにcommitされています。

heroku-20はruby v3.0.1に対応していて、mastodon v3.4.0はruby < v3.1.0なので、heroku(deploy-server)のruby verを上げてみました。Gemfile.lockをheroku用に更新してdeployすればokです。

Heroku supports the following Ruby versions and the associated Rubygems. A supported version means that you can expect our tools and platform to work with a given version. It also means you can receive technical support. Here are our supported Ruby versions:

2.6.7, Rubygems: 3.0.3.1

2.7.3, Rubygems: 3.1.6

3.0.1, Rubygems: 3.2.15

https://devcenter.heroku.com/articles/ruby-support#ruby-versions

$ git clone https://github.com/tootsuite/mastodon
$ cd ./mastodon
$ heroku git:remote -a $app
$ rm Gemfile.lock
$ rbenv install 3.0.1 
$ rbenv local 3.0.1
$ rbenv version
$ gem i bundler
$ bundle

$ git add .
$ git commit -m "update gemlock ruby3.0.1"
# git push heroku master
$ git push heroku main 

$ heroku run RAILS_ENV=production bundle exec rails db:migrate
$ heroku run RAILS_ENV=production bin/tootctl cache clear
$ heroku run RAILS_ENV=production bundle exec rails assets:precompile