Closed bensheldon closed 9 months ago
:wave: hey @bensheldon, thanks for reporting the issue.
dotenv 3.0 dropped support for Rails 6.0, but I also updated it to automatically load Rails integration without requiring the dotenv-rails
gem. I should probably update the Railtie to not try to load if the Rails version < 6.1.
Thank you! It seemed like user-error on my part, but figured some other folks might be in the same boat.
Congrats on the new release! I think I found a problem with Rails 6.0. Though I'm a little confused because I'm using
dotenv
and notdotenv-rails
which does seem to have the correct required version number:https://github.com/bkeepers/dotenv/blob/dd40e1c51eb63278a96724cc7150781e46cd2e94/dotenv-rails.gemspec#L13
...so feel free to close this out if it turns out the problem is that I should be using
dotenv-rails
instead ofdotenv
.Steps to reproduce
Rails 6.0's
tagged
logging method requires that a block is used. This was introduced in Rails 6.1: https://github.com/rails/rails/pull/38850When using the new 3.0 release with Rails 6.0, it produces a LocalJumpError because dotenv uses the non-block version which doesn't exist on that older version of Rails:
https://github.com/bkeepers/dotenv/blob/dd40e1c51eb63278a96724cc7150781e46cd2e94/lib/dotenv/rails.rb#L87
System configuration
dotenv version: 3.0.0
Rails version: 6.0.6.1
Ruby version: 3.3.0