initializers for .env
This commit is contained in:
parent
c6b0ccdbdb
commit
e21096f00a
2 changed files with 8 additions and 2 deletions
4
config/initializers/0001_dotenv.rb
Normal file
4
config/initializers/0001_dotenv.rb
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
# Please ensure this file is loaded first (alphabetical seems to work)
|
||||||
|
|
||||||
|
require 'dotenv'
|
||||||
|
Dotenv.load
|
|
@ -1,6 +1,8 @@
|
||||||
|
require 'dotenv/tasks'
|
||||||
|
|
||||||
namespace :heroku do
|
namespace :heroku do
|
||||||
desc "Generate the Heroku gems manifest from gem dependencies"
|
desc "Generate the Heroku gems manifest from gem dependencies"
|
||||||
task :gems do
|
task :gems => :dotenv do
|
||||||
RAILS_ENV='production'
|
RAILS_ENV='production'
|
||||||
Rake::Task[:environment].invoke
|
Rake::Task[:environment].invoke
|
||||||
list = Rails.configuration.gems.collect do |g|
|
list = Rails.configuration.gems.collect do |g|
|
||||||
|
@ -12,4 +14,4 @@ namespace :heroku do
|
||||||
f.write(list)
|
f.write(list)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue