前提・実現したいこと
bundle exec cap production deploy を記述した際にエラーになった。
発生している問題・エラーメッセージ
cap aborted! SSHKit::Runner::ExecuteError: Exception while executing as ec2-user@IPアドレス: bundle exit status: 7 bundle stdout: Nothing written bundle stderr: Your bundle is locked to mimemagic (0.3.5), but that version could not be found in any of the sources listed in your Gemfile. If you haven't changed sources, that means the author of mimemagic (0.3.5) has removed it. You'll need to update your bundle to a version other than mimemagic (0.3.5) that hasn't been removed in order to install. Caused by: SSHKit::Command::Failed: bundle exit status: 7 bundle stdout: Nothing written bundle stderr: Your bundle is locked to mimemagic (0.3.5), but that version could not be found in any of the sources listed in your Gemfile. If you haven't changed sources, that means the author of mimemagic (0.3.5) has removed it. You'll need to update your bundle to a version other than mimemagic (0.3.5) that hasn't been removed in order to install. Tasks: TOP => deploy:updated => bundler:install (See full trace by running task with --trace) The deploy has failed with an error: Exception while executing as ec2-user@IPアドレス: bundle exit status: 7 bundle stdout: Nothing written bundle stderr: Your bundle is locked to mimemagic (0.3.5), but that version could not be found in any of the sources listed in your Gemfile. If you haven't changed sources, that means the author of mimemagic (0.3.5) has removed it. You'll need to update your bundle to a version other than mimemagic (0.3.5) that hasn't been removed in order to install. ** DEPLOY FAILED ** Refer to log/capistrano.log for details. Here are the last 20 lines: DEBUG [b2a86b78] * rails_serve_static_assets (0.0.5) DEBUG [b2a86b78] * rails_stdout_logging (0.0.5) DEBUG [b2a86b78] * rails_12factor (0.0.3) DEBUG [b2a86b78] * raindrops (0.19.1) DEBUG [b2a86b78] * tilt (2.0.10) DEBUG [b2a86b78] * sass-rails (5.1.0) DEBUG [b2a86b78] * turbolinks-source (5.2.0) DEBUG [b2a86b78] * turbolinks (5.2.1) DEBUG [b2a86b78] * uglifier (4.2.0) DEBUG [b2a86b78] * unicorn (5.8.0) DEBUG [b2a86b78] * webpacker (4.3.0) DEBUG [b2a86b78] Install missing gems with `bundle install` DEBUG [b2a86b78] Finished in 0.390 seconds with exit status 1 (failed). INFO [7ca619b2] Running $HOME/.rbenv/bin/rbenv exec bundle install --jobs 4 --quiet as ec2-user@IPアドレス DEBUG [7ca619b2] Command: cd /var/www/アプリ名/releases/20210415071451 && ( export RBENV_ROOT="$HOME/.rbenv" RBENV_VERSION="2.6.5" ; $HOME/.rbenv/bin/rbenv exec bundle install --jobs 4 --quiet ) DEBUG [7ca619b2] Your bundle is locked to mimemagic (0.3.5), but that version could not be found in any of the sources listed in your Gemfile. If you haven't changed sources, that means the author of mimemagic (0.3.5) has removed it. You'll need to update your bundle to a version other than mimemagic (0.3.5) that hasn't been removed in order to install.
仮説
mimemagic (0.3.5)がインストールされていないからインストールしろってことだと思う
あと、バージョンロックされているとも書いてある。原因を調査中。
どなたかご存知の方がいらっしゃいましたらご教授お願いします。
追記
mimemagicが最近、配布停止になったらしくそれによるエラーなのかもしれない。
下記の記事でrailsのアップデートをしたがダメだった。
https://qiita.com/suzuki_sh/items/84806ce231ed9b0f2e6d
gem 'mimemagic'を追記して,bundleinstallをしたがダメだった。
あなたの回答
tips
プレビュー