server/files/usr/local/ec2onrails/bin/set_rails_env in pauldowman-ec2onrails-0.9.10 vs server/files/usr/local/ec2onrails/bin/set_rails_env in pauldowman-ec2onrails-0.9.10.0
- old
+ new
@@ -17,12 +17,11 @@
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-# This script updates the value of "environment" in the the mongrel_cluster
-# config file.
+# This script updates the current RAILS_ENV setting for this instance
require "yaml"
require "erb"
if ARGV.length != 1
@@ -30,11 +29,8 @@
exit 1
end
@rails_env = ARGV[0]
-# update mongrel_cluster config
-config = YAML::load_file("/etc/mongrel_cluster/app.yml")
-config["environment"] = @rails_env
-File.open("/etc/mongrel_cluster/app.yml", 'w') do |f|
- YAML.dump(config, f)
+File.open("/etc/ec2onrails/rails_env", 'w') do |f|
+ f << @rails_env
end