ECS というモダンな技術を扱いながらも、基本を疎かにしないようにするための個人的メモです。
前提条件
・ECR にコンテナをプッシュできている。
・タスクのステータスが Running にならない。
・CloudWatch で以下のようなエラーログが確認できる
2021-04-02T17:12:42.440+09:00 bundler: failed to load command: rails (/usr/local/bundle/bin/rails)
2021-04-02T17:12:42.440+09:00 Bundler::GemNotFound: Could not find i18n-1.8.9 in any of the sources
2021-04-02T17:12:42.440+09:00 /usr/local/lib/ruby/2.7.0/bundler/spec_set.rb:86:in `block in materialize'
2021-04-02T17:12:42.440+09:00 /usr/local/lib/ruby/2.7.0/bundler/spec_set.rb:80:in `map!'
2021-04-02T17:12:42.440+09:00 /usr/local/lib/ruby/2.7.0/bundler/spec_set.rb:80:in `materialize'
2021-04-02T17:12:42.440+09:00 /usr/local/lib/ruby/2.7.0/bundler/definition.rb:170:in `specs'
2021-04-02T17:12:42.440+09:00 /usr/local/lib/ruby/2.7.0/bundler/definition.rb:237:in `specs_for'
2021-04-02T17:12:42.440+09:00 /usr/local/lib/ruby/2.7.0/bundler/definition.rb:226:in `requested_specs'
2021-04-02T17:12:42.440+09:00 /usr/local/lib/ruby/2.7.0/bundler/runtime.rb:101:in `block in definition_method'
2021-04-02T17:12:42.440+09:00 /usr/local/lib/ruby/2.7.0/bundler/runtime.rb:20:in `setup'
2021-04-02T17:12:42.440+09:00 /usr/local/lib/ruby/2.7.0/bundler.rb:149:in `setup'
2021-04-02T17:12:42.440+09:00 /usr/local/lib/ruby/2.7.0/bundler/setup.rb:20:in `block in <top (required)>'
2021-04-02T17:12:42.440+09:00 /usr/local/lib/ruby/2.7.0/bundler/ui/shell.rb:136:in `with_level'
2021-04-02T17:12:42.440+09:00 /usr/local/lib/ruby/2.7.0/bundler/ui/shell.rb:88:in `silence'
2021-04-02T17:12:42.440+09:00 /usr/local/lib/ruby/2.7.0/bundler/setup.rb:20:in `<top (required)>'
注目は2行目
Bundler::GemNotFound: Could not find i18n-1.8.9 in any of the sources
この部分。
解決策
gem install i18n
ただ Gem がインストールされていなかっただけだった。これで無事に、タスクのステータスが Running になった。基本を大事にしていきたい。
