<?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: Making Rake tasks ignore Rails observers</title>
	<atom:link href="http://www.jamesrobey.com/making-rake-tasks-ignore-rails-observers/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.jamesrobey.com/making-rake-tasks-ignore-rails-observers/</link>
	<description>ruby/rails/ppc/seo/4hww/geoarbitrage/vagabond/catamaran/3flags/hydroponics/economics/philosophy/outerspace/etc</description>
	<lastBuildDate>Mon, 30 Aug 2010 14:55:24 -0700</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Flinn</title>
		<link>http://www.jamesrobey.com/making-rake-tasks-ignore-rails-observers/comment-page-1/#comment-58</link>
		<dc:creator>Flinn</dc:creator>
		<pubDate>Mon, 14 Apr 2008 16:36:52 +0000</pubDate>
		<guid isPermaLink="false">http://jamesrobey.com/making-rake-tasks-ignore-rails-observers/#comment-58</guid>
		<description>You can also not use config/environments.rb to load observers and instead use config/initializers/observers.rb like so:

&lt;code&gt;
ActiveRecord::Base.observers = :cacher, :garbage_collector
ActiveRecord::Base.instantiate_observers
&lt;/code&gt;</description>
		<content:encoded><![CDATA[<p>You can also not use config/environments.rb to load observers and instead use config/initializers/observers.rb like so:</p>
<p><code><br />
ActiveRecord::Base.observers = :cacher, :garbage_collector<br />
ActiveRecord::Base.instantiate_observers<br />
</code></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Panasonic Youth &#8211; Rails observers make rake db:migrate crash from version 0</title>
		<link>http://www.jamesrobey.com/making-rake-tasks-ignore-rails-observers/comment-page-1/#comment-21</link>
		<dc:creator>Panasonic Youth &#8211; Rails observers make rake db:migrate crash from version 0</dc:creator>
		<pubDate>Tue, 08 Jan 2008 16:15:15 +0000</pubDate>
		<guid isPermaLink="false">http://jamesrobey.com/making-rake-tasks-ignore-rails-observers/#comment-21</guid>
		<description>[...] Some googling led me to James Robey&#039;s proposed fix, which as the downfall of disabling the observer for any call to rake. This little hack should be a bit better, in that it will only disable the observer for rake db:migrate calls:   # observers break a migrate from VERSION 0 - disable them for rake db:migrate unless &#40; File.basename&#40;$0&#41; == &quot;rake&quot; &amp;&amp; ARGV == &#91;&quot;db:migrate&quot;&#93; &#41;&#160;  &#160; config.active_record.observers = :user_observer end [...]</description>
		<content:encoded><![CDATA[<p>[...] Some googling led me to James Robey&#8217;s proposed fix, which as the downfall of disabling the observer for any call to rake. This little hack should be a bit better, in that it will only disable the observer for rake db:migrate calls:   # observers break a migrate from VERSION 0 &#8211; disable them for rake db:migrate unless &#40; File.basename&#40;$0&#41; == &#8220;rake&#8221; &amp;&amp; ARGV == &#91;&#8221;db:migrate&#8221;&#93; &#41;&nbsp;  &nbsp; config.active_record.observers = :user_observer end [...]</p>
]]></content:encoded>
	</item>
</channel>
</rss>

<!-- Dynamic Page Served (once) in 0.166 seconds -->
