def default_options
        if Object.const_defined?('Rails')
          {
            :file   => Rails.root.join('config', 'config.yml'),
            :reload => Rails.env.development?,
            :env    => Rails.env
          }
        else
          {
            :file   => File.expand_path("config.yml"),
            :reload => false,
            :env    => "development"
          }
        end
      end
def default_options
        if Object.const_defined?('Rails')
          {
            :file   => Rails.root.join('config', 'config.yml'),
            :reload => Rails.env.development?,
            :env    => Rails.env
          }
        else
          {
            :file   => File.expand_path("config.yml"),
            :reload => false,
            :env    => "development"
          }
        end
      end
Default configuration options for Rails and non Rails applications