<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: mod_rails set RAILS_ENV variable to QA, Staging, or Production</title>
	<atom:link href="http://ahabman.com/blog/2008/05/mod_rails-set-rails_env-variable-to-qa-staging-or-production/feed/" rel="self" type="application/rss+xml" />
	<link>http://ahabman.com/blog/2008/05/mod_rails-set-rails_env-variable-to-qa-staging-or-production/</link>
	<description></description>
	<lastBuildDate>Thu, 26 May 2011 04:03:58 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
	<item>
		<title>By: Unirec</title>
		<link>http://ahabman.com/blog/2008/05/mod_rails-set-rails_env-variable-to-qa-staging-or-production/#comment-24</link>
		<dc:creator>Unirec</dc:creator>
		<pubDate>Mon, 08 Dec 2008 11:21:49 +0000</pubDate>
		<guid isPermaLink="false">http://www.grandrapidswebdeveloper.com/blog/2008/05/mod_rails-set-rails_env-variable-to-qa-staging-or-production/#comment-24</guid>
		<description>After trying every other method I could find, I added Andrew&#039;s solution to my &#039;witches brew&#039; - works great. Thanks! 

[I can&#039;t believe this hack is required to set up a simple staging environment (in a multistage system). I got into Rails to try to avoid this kind of BS...]</description>
		<content:encoded><![CDATA[<p>After trying every other method I could find, I added Andrew&#8217;s solution to my &#8216;witches brew&#8217; &#8211; works great. Thanks! </p>
<p>[I can't believe this hack is required to set up a simple staging environment (in a multistage system). I got into Rails to try to avoid this kind of BS...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Owen</title>
		<link>http://ahabman.com/blog/2008/05/mod_rails-set-rails_env-variable-to-qa-staging-or-production/#comment-19</link>
		<dc:creator>Owen</dc:creator>
		<pubDate>Sat, 01 Nov 2008 20:36:06 +0000</pubDate>
		<guid isPermaLink="false">http://www.grandrapidswebdeveloper.com/blog/2008/05/mod_rails-set-rails_env-variable-to-qa-staging-or-production/#comment-19</guid>
		<description>I just used this and it was a huge help!</description>
		<content:encoded><![CDATA[<p>I just used this and it was a huge help!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Andrew Vit</title>
		<link>http://ahabman.com/blog/2008/05/mod_rails-set-rails_env-variable-to-qa-staging-or-production/#comment-11</link>
		<dc:creator>Andrew Vit</dc:creator>
		<pubDate>Fri, 22 Aug 2008 21:40:11 +0000</pubDate>
		<guid isPermaLink="false">http://www.grandrapidswebdeveloper.com/blog/2008/05/mod_rails-set-rails_env-variable-to-qa-staging-or-production/#comment-11</guid>
		<description>Thanks! I just saw your answer to my question in the dreamhost forums from back in May... I&#039;ve already set up something similar, except I&#039;m skipping the regex &amp; extra rb file for a simple solution all in my deploy.rb file. It just prefixes the file with the RAILS_ENV using cat:

after &quot;deploy:finalize_update&quot;, &quot;deploy:set_rails_env&quot;

namespace :deploy do
task :set_rails_env do
  tmp = &quot;#{current_release}/tmp/environment.rb&quot;
  final = &quot;#{current_release}/config/environment.rb&quot;
  run &lt;&lt;-BASH
    echo &#039;RAILS_ENV = &quot;#{rails_env}&quot;&#039; &gt; #{tmp};
    cat #{final} &gt;&gt; #{tmp} &amp;&amp; mv #{tmp} #{final};
  BASH
end
end</description>
		<content:encoded><![CDATA[<p>Thanks! I just saw your answer to my question in the dreamhost forums from back in May&#8230; I&#8217;ve already set up something similar, except I&#8217;m skipping the regex &amp; extra rb file for a simple solution all in my deploy.rb file. It just prefixes the file with the RAILS_ENV using cat:</p>
<p>after &quot;deploy:finalize_update&quot;, &quot;deploy:set_rails_env&quot;</p>
<p>namespace :deploy do<br />
task :set_rails_env do<br />
  tmp = &quot;#{current_release}/tmp/environment.rb&quot;<br />
  final = &quot;#{current_release}/config/environment.rb&quot;<br />
  run &lt;&lt;-BASH<br />
    echo &#x27;RAILS_ENV = &quot;#{rails_env}&quot;&#x27; &gt; #{tmp};<br />
    cat #{final} &gt;&gt; #{tmp} &amp;&amp; mv #{tmp} #{final};<br />
  BASH<br />
end<br />
end</p>
]]></content:encoded>
	</item>
</channel>
</rss>

