class Dotenv::Railtie
Rails applications
Dotenv Railtie for using Dotenv to load environment from a file into
def self.load
Rails uses `#method_missing` to delegate all class methods to the
def self.load instance.load end
def load
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
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