We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b86d9e4 commit 54aa1f6Copy full SHA for 54aa1f6
1 file changed
lib/dotenv/rails.rb
@@ -10,14 +10,11 @@
10
Dotenv.instrumenter = ActiveSupport::Notifications
11
12
# Watch all loaded env files with Spring
13
-begin
14
- require "spring/commands"
+if defined?(Spring)
15
ActiveSupport::Notifications.subscribe("load.dotenv") do |*args|
16
event = ActiveSupport::Notifications::Event.new(*args)
17
Spring.watch event.payload[:env].filename if Rails.application
18
end
19
-rescue LoadError, ArgumentError
20
- # Spring is not available
21
22
23
module Dotenv
0 commit comments