Read RACK_ENV but apply RAILS_ENV
Ruby whenever uses RAILS_ENV in crontab.
This commit is contained in:
parent
fa1a58bea2
commit
921bfd73cc
2 changed files with 6 additions and 2 deletions
|
|
@ -1,5 +1,5 @@
|
|||
if ENV['RAILS_ENV']
|
||||
set :environment, ENV['RAILS_ENV']
|
||||
if ENV['RACK_ENV']
|
||||
set :environment, ENV['RACK_ENV']
|
||||
end
|
||||
|
||||
set :output, 'vedia.log'
|
||||
|
|
|
|||
4
vedia.rb
4
vedia.rb
|
|
@ -10,6 +10,10 @@ require 'redcarpet'
|
|||
|
||||
include GetText
|
||||
|
||||
if ENV['RAILS_ENV']
|
||||
set :environment, ENV['RAILS_ENV']
|
||||
end
|
||||
|
||||
require_relative 'mj'
|
||||
require_relative 'config/environments/defaults.rb'
|
||||
require_relative "config/environments/#{settings.environment}"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue