Mastodon 2.4.0に上げるときに困ったこと

Mastodon 2.4.0にアップデートするときdb:migrateができなかったのをなんとかした。*1

現象

以下みたいな感じになる。

$ docker-compose run --rm web rake db:migrate
Starting mastodon_redis_1 ... done
Starting mastodon_db_1    ... done
rake aborted!
Gem::LoadError: You have already activated rake 12.0.0, but your Gemfile requires rake 12.3.1. Prepending `bundle exec` to your command may solve this.
/mastodon/config/boot.rb:3:in `<top (required)>'
/mastodon/config/application.rb:1:in `require_relative'
/mastodon/config/application.rb:1:in `<top (required)>'
/mastodon/Rakefile:4:in `<top (required)>'
(See full trace by running task with --trace)

railsの方使えばいいんでしょとrails使うと違うエラー。

$ docker-compose run --rm web rails db:migrate
[FATAL tini (6)] exec rails failed: No such file or directory

解決

以下みたいにコマンドを打つ

$docker-compose run --rm web ./bin/rails db:migrate

ついでにprecompileも。

$ docker-compose run --rm web ./bin/rails assets:precompile

宣伝

ドールMastodonやってます。
mastodoll.net

*1:ドッカーって奴つかうとこういうの無くなるんじゃなかったんですか!!!!