Fix Ruby not starting if newer version of date gem installed
What does this MR do and why?
If you had date v3.3.4 installed, Puma and Sidekiq would not start due to this error message:
`check_for_activated_spec!': You have already activated date 3.3.4, but your Gemfile requires date 3.3.3. Prepending `bundle exec` to your command may solve this. (Gem::LoadError)
This occurred because the require 'date'
inside vendor/gems/attr_encrypted/attr_encrypted.gemspec
caused Ruby to load the latest version of date
, but then this conflicts
with the version specified in Gemfile.lock
. More details in https://github.com/rubygems/rubygems/issues/7178#issuecomment-1821963836.
To avoid this problem, drop the use of the date in the gemspec.
How to set up and validate locally
- Run
gem install date
. - Run
bundle exec irb
.
Without this change, you hit this failure.
Edited by Stan Hu