Skip to content

Commit

Permalink
Merge pull request #481 from bkeepers/check-optional-rails
Browse files Browse the repository at this point in the history
Manually check optional Rails dependency version
  • Loading branch information
bkeepers authored Feb 14, 2024
2 parents 3a2500c + f55afd8 commit ac8ea76
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions lib/dotenv/rails.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
# Since rubygems doesn't support optional dependencies, we have to manually check
unless Gem::Requirement.new(">= 6.1").satisfied_by?(Gem::Version.new(Rails.version))
warn "dotenv 3.0 only supports Rails 6.1 or later. Use dotenv ~> 2.0."
return
end

require "dotenv"
require "dotenv/replay_logger"
require "dotenv/log_subscriber"
Expand Down

0 comments on commit ac8ea76

Please sign in to comment.