From 20a3f86729db5c09c719ac8260f5ebb4eca6fe64 Mon Sep 17 00:00:00 2001 From: Mathieu Magnin Date: Fri, 9 Mar 2018 10:00:11 +0100 Subject: [PATCH] Dotenv-rails should be defined a the very top of the gemfile --- Gemfile | 4 ++-- config/application.rb | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Gemfile b/Gemfile index f219df794..b0b7133c9 100644 --- a/Gemfile +++ b/Gemfile @@ -1,5 +1,7 @@ source 'https://rubygems.org' +# dotenv should always be loaded before rails +gem 'dotenv-rails', require: 'dotenv/rails-now' gem 'rails' # Use SCSS for stylesheets @@ -171,7 +173,5 @@ group :development, :test do # Deploy gem 'mina', ref: '343a7', git: 'https://github.com/mina-deploy/mina.git' - # Bundle edge Rails instead: gem 'rails', github: 'rails/rails' - gem 'dotenv-rails' gem 'rspec_junit_formatter' end diff --git a/config/application.rb b/config/application.rb index 7d54fd628..deea28ede 100644 --- a/config/application.rb +++ b/config/application.rb @@ -6,6 +6,8 @@ require 'rails/all' # you've limited to :test, :development, or :production. Bundler.require(*Rails.groups) +Dotenv::Railtie.load + module TPS class Application < Rails::Application # Settings in config/environments/* take precedence over those specified here.