0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

bundle install で起きたエラーについて ~ puma Gem ~

Posted at

はじめに

・投稿者は初学者ですので誤った情報を投稿してしまうことがあります。その時はぜひ、遠慮会釈なしにご指摘いただけると幸いです。

エラーの内容

エラーが発生したのは唐突で、ローカルサーバーを再起動するためにrails sを行ったところ、以下のようなエラーが発生しました。

Could not find puma-4.3.3 in any of the sources
Run `bundle install` to install missing gems.

Gemfile を弄った記憶がなかったため混乱しました。念のため、GitHub Desktopで変更履歴があったか調べましたが、やはりサーバー再起動前と何も変わっていませんでした。

とりあえず、 Run bundle install とあったので素直に実行したら、またエラーが発生しました。

An error occurred while installing puma (4.3.3), and Bundler cannot continue.
Make sure that `gem install puma -v '4.3.3' --source 'https://rubygems.org/'` succeeds before bundling.

赤文字でターミナルが怒ってきました。

エラー解決の方法

エラーの文の中に、gem install puma -v '4.3.3' (pumaのバージョンを4.3.3にしろ)という指示があったのでGemfileを修正しました。
それから、Gemfile.lockを削除し、bundle installを実行したところ、正常にインストールされ、サーバーの起動もできました。

まとめ

なぜ、急にGemfile を弄っていないのにエラーが起きたのかわからなかったため、puma というGemについて色々と調べましたが、Webサーバーに関係するGemということしかわかりませんでした。悔しいですが、またpumaのせいで動かないという時がきたら、改めて調べ尽くしたいと思います。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?