diff --git a/lib/silent-postgres.rb b/lib/silent-postgres.rb index b8d38f1..aedcf8c 100755 --- a/lib/silent-postgres.rb +++ b/lib/silent-postgres.rb @@ -1,4 +1,4 @@ -if %w(test development).include?(ENV["RAILS_ENV"]) +if %w(test development).include?(Rails.respond_to?(:env) ? Rails.env : ENV["RAILS_ENV"]) require "silent-postgres/railtie"