質問をすることでしか得られない、回答やアドバイスがある。

15分調べてもわからないことは、質問しよう!

新規登録して質問してみよう
ただいま回答率
85.48%
Ruby on Rails 6

Ruby on Rails 6は、オープンソースのWebアプリケーションフレームワークです。「同じことを繰り返さない」というRailsの基本理念のもと、他のフレームワークより少ないコードで簡単に開発できるよう設計されています。

Capistrano

Rubyで書かれたサーバオーケストレーションで、複数のサーバでスクリプトを実行する際に用いられます。主な使用用途はWebアプリケーションのデプロイメントです。 アプリケーションのバージョンアップ自動化、およびデータベースの変更などもできます。

Q&A

0回答

787閲覧

bundle exec cap production deploy をしたら下記のエラーになった。

SETO22

総合スコア3

Ruby on Rails 6

Ruby on Rails 6は、オープンソースのWebアプリケーションフレームワークです。「同じことを繰り返さない」というRailsの基本理念のもと、他のフレームワークより少ないコードで簡単に開発できるよう設計されています。

Capistrano

Rubyで書かれたサーバオーケストレーションで、複数のサーバでスクリプトを実行する際に用いられます。主な使用用途はWebアプリケーションのデプロイメントです。 アプリケーションのバージョンアップ自動化、およびデータベースの変更などもできます。

0グッド

0クリップ

投稿2021/04/14 01:27

編集2021/04/15 07:38

前提・実現したいこと

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をしたがダメだった。

気になる質問をクリップする

クリップした質問は、後からいつでもMYページで確認できます。

またクリップした質問に回答があった際、通知やメールを受け取ることができます。

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

guest

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

まだ回答がついていません

会員登録して回答してみよう

アカウントをお持ちの方は

15分調べてもわからないことは
teratailで質問しよう!

ただいまの回答率
85.48%

質問をまとめることで
思考を整理して素早く解決

テンプレート機能で
簡単に質問をまとめる

質問する

関連した質問