class Dotenv::Railtie

Rails applications
Dotenv Railtie for using Dotenv to load environment from a file into

def self.load

instance, which means `Kernel#load` gets called here. We don't want that.
Rails uses `#method_missing` to delegate all class methods to the
def self.load
  instance.load
end

def load

can manually call `Dotenv::Railtie.load` if you needed it sooner.
This will get called during the `before_configuration` callback, but you

Public: Load dotenv
def load
  Dotenv.load(
    root.join(".env.local"),
    root.join(".env.#{Rails.env}"),
    root.join(".env")
  )
end

def root

or the current working directory.
initialized, so this falls back to the `RAILS_ROOT` environment variable,
Internal: `Rails.root` is nil in Rails 4.1 before the application is
def root
  Rails.root || Pathname.new(ENV["RAILS_ROOT"] || Dir.pwd)
end