Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Restart god after changing RAILS_ENV because god stores the value of …

…RAILS_ENV and uses it in notifications.
  • Loading branch information...
commit 76c67c827e322edd40102ae1d4b9cc1a9dc48815 1 parent 4bfbc59
@pauldowman authored
Showing with 7 additions and 0 deletions.
  1. +7 −0 server/files/usr/local/ec2onrails/bin/set_rails_env
7 server/files/usr/local/ec2onrails/bin/set_rails_env
@@ -23,6 +23,8 @@
require "yaml"
require "erb"
+require "#{File.dirname(__FILE__)}/../lib/utils"
if ARGV.length != 1
puts "usage: set_rails_env <value>"
@@ -34,3 +36,8 @@ end"/etc/ec2onrails/rails_env", 'w') do |f|
f << @rails_env
+# Tell god to quit, which will cause it to be restarted immediately by init.
+# When it restarts it keeps it's monitoring state. This causes it to reload
+# it's idea of RAILS_ENV because it's used in notifications. "god quit"
Please sign in to comment.
Something went wrong with that request. Please try again.