From: Tom Clegg Date: Thu, 20 Jun 2013 16:14:28 +0000 (-0400) Subject: obey RAILS_ENV if given X-Git-Tag: 1.1.0~3189 X-Git-Url: https://git.arvados.org/arvados.git/commitdiff_plain/482d0e7afcfbf3379512c4754ea896ac294c1b6a obey RAILS_ENV if given --- diff --git a/services/api/script/crunch-dispatch.rb b/services/api/script/crunch-dispatch.rb index f749f22a77..9e7097e98e 100755 --- a/services/api/script/crunch-dispatch.rb +++ b/services/api/script/crunch-dispatch.rb @@ -11,7 +11,7 @@ $signal = {} end end -ENV["RAILS_ENV"] = ARGV[0] || "development" +ENV["RAILS_ENV"] = ARGV[0] || ENV["RAILS_ENV"] || "development" require File.dirname(__FILE__) + '/../config/boot' require File.dirname(__FILE__) + '/../config/environment' diff --git a/services/api/script/import_commits.rb b/services/api/script/import_commits.rb index 6c3221992a..80c574892c 100755 --- a/services/api/script/import_commits.rb +++ b/services/api/script/import_commits.rb @@ -1,6 +1,6 @@ #!/usr/bin/env ruby -ENV["RAILS_ENV"] = ARGV[0] || "development" +ENV["RAILS_ENV"] = ARGV[0] || ENV["RAILS_ENV"] || "development" require File.dirname(__FILE__) + '/../config/boot' require File.dirname(__FILE__) + '/../config/environment'