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.

エラー:Could not find 'spring' (= 2.1.1) among 167 total gem(s) (Gem::MissingSpecError)

Posted at

環境

MacOS BigSur Ver11.5.2
Ruby 3.0.2
Rails 6.1.4.1

状況

RailsアプリをHerokuへデプロイした際に下記のエラーが発生

Could not find 'spring' (= 2.1.1) among 167 total gem(s) (Gem::MissingSpecError) 

原因

どうやらこのgemが悪さをしているらしい

Gemfile
group :development do
 
  gem 'spring'
  gem 'spring-commands-rspec'
end

疑問点

developmentだけのgemなのになぜデプロイ時にエラーが出るのか謎

解決策

この2つのgemをコメントアウト

Gemfile
group :development do
 
  # gem 'spring'
  # gem 'spring-commands-rspec'
end

bundle installも忘れずに!
デプロイし直すと正常にデプロイ完了!

参考

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?