Gemfile
group :development, :test do
~Added below~
gem 'rspec-rails'
gem 'factory_bot_rails'
end
I updated the Gemfile, so run bundle install with the docker command
$ docker-compose run web bundle exec rails g rspec:install
Could not find diff-lcs-1.4.4 in any of the sources
Run `bundle install` to install missing gems.
I tried to refer to various articles and tried it, but it didn't work ...
Is there a case where bundle install is not executed in the cache while googled variously? I saw the article, and immediately executed it
$ docker-compose build --no-cache
$ docker-compose run web bundle exec rails g rspec:install
Creating app_run ... done
Running via Spring preloader in process 64
create .rspec
create spec
create spec/spec_helper.rb
create spec/rails_helper.rb
Successful creation
Even if docker-compose build is done, cache is enabled and the setting change is reflected and it may not work well, so when updating Gemfile during development
$ docker-compose build --no-cache
It is better to execute with
The point is that it took a long time to resolve because there were many articles related to spring stop. But I also felt that this accumulation was important because I was a beginner.
I referred to the following article! Thank you very much!
Solution for bundle install not in container with Docker Build docker without using cache