forked from mastodon/mastodon
-
Notifications
You must be signed in to change notification settings - Fork 0
Update Mastodon from v2.6.5 to v2.7.0
kedama edited this page Jan 27, 2019
·
4 revisions
- update mastodon v2.6.5 to v2.7.0
- update ruby v2.5.3 to v2.6.0
run as mastodon user.
~$ cd live
~/live$ ruby -v
ruby 2.5.3p105 (2018-10-18 revision 65156) [x86_64-linux]
~/live$ cd ~/.rbenv/plugins/ruby-build/
~/.rbenv/plugins/ruby-build$ git fetch
remote: Enumerating objects: 254, done.
remote: Counting objects: 100% (254/254), done.
remote: Compressing objects: 100% (16/16), done.
remote: Total 307 (delta 233), reused 253 (delta 233), pack-reused 53
Receiving objects: 100% (307/307), 67.20 KiB | 882.00 KiB/s, done.
Resolving deltas: 100% (253/253), completed with 48 local objects.
From https://github.com/rbenv/ruby-build
648fc99..434bedd master -> origin/master
* [new tag] v20181207 -> v20181207
* [new tag] v20181225 -> v20181225
~/.rbenv/plugins/ruby-build$ git checkout v20181225
~$ cd
~$ echo $RUBY_CONFIGURE_OPTS
--with-jemalloc
~$ rbenv install 2.6.0
~$ rbenv versions
2.5.3
2.6.0
run as root.
# systemctl stop mastodon-web
# systemctl stop mastodon-streaming
# systemctl stop mastodon-sidekiq
# sudo -u postgres pg_dumpall > /var/tmp/foresdon.jp.190127.dump
# gzip /var/tmp/foresdon.jp.190127.dump
run as mastodon user.
~$ cd live
~/live$ git fetch
~/live$ git checkout v2.7.0
~/live$ ruby -v
ruby 2.6.0p0 (2018-12-25 revision 66547) [x86_64-linux]
~/live$ gem update --system
Updating rubygems-update
Fetching rubygems-update-3.0.2.gem
Successfully installed rubygems-update-3.0.2
Parsing documentation for rubygems-update-3.0.2
Installing ri documentation for rubygems-update-3.0.2
Installing darkfish documentation for rubygems-update-3.0.2
Done installing documentation for rubygems-update after 45 seconds
Parsing documentation for rubygems-update-3.0.2
Done installing documentation for rubygems-update after 0 seconds
Installing RubyGems 3.0.2
Bundler 1.17.3 installed
RubyGems 3.0.2 installed
Regenerating binstubs
Parsing documentation for rubygems-3.0.2
Installing ri documentation for rubygems-3.0.2
:
:
~/live$ curl --compressed -o- -L https://yarnpkg.com/install.sh | bash
~/live$ bundle install
~/live$ yarn install
~/live$ RAILS_ENV=production bundle exec rails assets:precompile
~/live$ SKIP_POST_DEPLOYMENT_MIGRATIONS=true RAILS_ENV=production bundle exec rails db:migrate
run as root.
# systemctl start mastodon-sidekiq
# systemctl start mastodon-streaming
# systemctl start mastodon-web
run as mastodon user.
~/live$ RAILS_ENV=production bundle exec rails db:migrate
restart mastodon if got a 500 error when click "reblogged_by", "favourited_by", etc.
in puma-stdout.log:
[f9bc0481-f4a8-43c8-8255-c4b07063f12c] method=GET path=/api/v1/statuses/101486718349584742/reblogged_by format=html controller=Api::V1::Statuses::RebloggedByAccountsController action=index status=500 error='ActiveRecord::StatementInvalid: PG::UndefinedColumn: ERROR: column accounts.statuses_count does not exist
[f9bc0481-f4a8-43c8-8255-c4b07063f12c] app/controllers/api/v1/statuses/reblogged_by_accounts_controller.rb:20:in `load_accounts'
[f9bc0481-f4a8-43c8-8255-c4b07063f12c] app/controllers/api/v1/statuses/reblogged_by_accounts_controller.rb:13:in `index'