<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>On The Mark &#187; Aptana Studio</title>
	<atom:link href="http://markmonica.com/tag/aptana-studio/feed/" rel="self" type="application/rss+xml" />
	<link>http://markmonica.com</link>
	<description>IT blogging by Mark Monica</description>
	<lastBuildDate>Fri, 20 Jan 2012 21:06:31 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>ROR Error: undefined method `include_root_in_json=&#8217; &#8230;</title>
		<link>http://markmonica.com/2009/03/06/error-undefined-method-include_root_in_json/</link>
		<comments>http://markmonica.com/2009/03/06/error-undefined-method-include_root_in_json/#comments</comments>
		<pubDate>Fri, 06 Mar 2009 15:15:59 +0000</pubDate>
		<dc:creator>Mark Monica</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Ruby On Rails Blogs]]></category>
		<category><![CDATA[Aptana Studio]]></category>
		<category><![CDATA[Error]]></category>
		<category><![CDATA[JSON]]></category>
		<category><![CDATA[Radrails]]></category>
		<category><![CDATA[Rails]]></category>
		<category><![CDATA[Rails 2.0]]></category>
		<category><![CDATA[Ruby on Rails]]></category>

		<guid isPermaLink="false">http://markmonica.com/?p=40</guid>
		<description><![CDATA[<p>Posted in <a href="http://markmonica.com/category/programming/" title="Programming">Programming</a><a href="http://markmonica.com/category/programming/rorblogs/" title="Ruby On Rails Blogs">Ruby On Rails Blogs</a></p>Background Upon continuing a Ruby on Rails project after a few months delay, Aptana Studio&#8217;s RadRails editor installed some updates.  I suspect something that  changed in Rails itself (GEM update) caused the error I received. Error Message undefined method `include_root_in_json=&#8217; for ActiveRecord::Base:Class (NoMethodError) Solution To fix this error rename the config/initializers/new_rails_defaults.rb to config/initializers/new_rails_defaults.rb.bak. It appears [...]]]></description>
			<content:encoded><![CDATA[<p>Posted in <a href="http://markmonica.com/category/programming/" title="Programming">Programming</a><a href="http://markmonica.com/category/programming/rorblogs/" title="Ruby On Rails Blogs">Ruby On Rails Blogs</a></p><!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><h3>Background</h3>
<p>Upon continuing a Ruby on Rails project after a few months delay, Aptana Studio&#8217;s RadRails editor installed some updates.  I suspect something that  changed in Rails itself (GEM update) caused the error I received.</p>
<h3>Error Message</h3>
<p><span style="color: #ff0000;"><em>undefined method `include_root_in_json=&#8217; for ActiveRecord::Base:Class (NoMethodError)</em></span></p>
<h3>Solution<em><br />
</em></h3>
<p>To fix this error rename the <span style="color: #008000;"><em>config/initializers/new_rails_defaults.rb</em></span> <strong>to</strong> <em><span style="color: #008000;">config/initializers/new_rails_defaults.rb.bak</span>.<br />
</em></p>
<p>It appears that the old code placed in these files no longer works with ROR 2.0.2.</p>
<blockquote><p># These settings change the behavior of Rails 2 apps and will be defaults<br />
# for Rails 3. You can remove this initializer when Rails 3 is released.</p>
<p># Include Active Record class name as root for JSON serialized output.<br />
ActiveRecord::Base.include_root_in_json = true</p>
<p># Store the full class name (including module namespace) in STI type column.<br />
ActiveRecord::Base.store_full_sti_class = true</p>
<p># Use ISO 8601 format for JSON serialized times and dates.<br />
ActiveSupport.use_standard_json_time_format = true</p>
<p># Don&#8217;t escape HTML entities in JSON, leave that for the #json_escape helper.<br />
# if you&#8217;re including raw json in an HTML page.<br />
ActiveSupport.escape_html_entities_in_json = false</p></blockquote>
<p>The file now created in a new project appears as follows:</p>
<blockquote><p># These settings change the behavior of Rails 2 apps and will be defaults<br />
# for Rails 3. You can remove this initializer when Rails 3 is released.</p>
<p>if defined?(ActiveRecord)<br />
# Include Active Record class name as root for JSON serialized output.<br />
ActiveRecord::Base.include_root_in_json = true</p>
<p># Store the full class name (including module namespace) in STI type column.<br />
ActiveRecord::Base.store_full_sti_class = true<br />
end</p>
<p># Use ISO 8601 format for JSON serialized times and dates.<br />
ActiveSupport.use_standard_json_time_format = true</p>
<p># Don&#8217;t escape HTML entities in JSON, leave that for the #json_escape helper.<br />
# if you&#8217;re including raw json in an HTML page.<br />
ActiveSupport.escape_html_entities_in_json = false</p></blockquote>
<h4>Footnotes</h4>
<p><em>See  <a href="http://www.hostingrails.com/1461/dbmigrate-undefined-method-include_root_in_json" target="_blank">http://www.hostingrails.com/1461/dbmigrate-undefined-method-include_root_in_json</a> for more help with this error.<br />
</em></p>
<div class="shr-publisher-40"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><!-- End Shareaholic LikeButtonSetBottom Automatic -->]]></content:encoded>
			<wfw:commentRss>http://markmonica.com/2009/03/06/error-undefined-method-include_root_in_json/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

