Skip to content

Commit cf83f00

Browse files
committed
fix: Detect Rails via Rails::Railtie
1 parent 6c59c8a commit cf83f00

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

lib/appmap.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@
5757
end
5858
end.enable
5959

60-
if defined?(::Rails)
60+
if defined?(::Rails::Railtie)
6161
require 'appmap/railtie'
6262
end
6363

lib/appmap/detect_enabled.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ def recording_method_enabled?
104104
end
105105

106106
def rails_env
107-
return Rails.env if defined?(Rails)
107+
return Rails.env if defined?(::Rails::Railtie)
108108

109109
return ENV['RAILS_ENV']
110110
end

0 commit comments

Comments
 (0)