<?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>42 &#187; You have a nil object</title>
	<atom:link href="http://www.42.mach7x.com/tag/you-have-a-nil-object/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.42.mach7x.com</link>
	<description>Thoughts and tips about programming with Ruby on Rails</description>
	<lastBuildDate>Wed, 01 Feb 2012 14:38:36 +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>:int and :integer problem in Ruby on Rails migration</title>
		<link>http://www.42.mach7x.com/2007/11/05/int-and-integer-problem-in-ruby-on-rails-migration/</link>
		<comments>http://www.42.mach7x.com/2007/11/05/int-and-integer-problem-in-ruby-on-rails-migration/#comments</comments>
		<pubDate>Mon, 05 Nov 2007 09:59:35 +0000</pubDate>
		<dc:creator>kosmas</dc:creator>
				<category><![CDATA[ruby on rails]]></category>
		<category><![CDATA[migrations]]></category>
		<category><![CDATA[You have a nil object]]></category>

		<guid isPermaLink="false">http://www.42.mach7x.com/?p=6</guid>
		<description><![CDATA[After spending some time trying to make a migration work, and having the error message coming back: You have a nil object when you didn't expect it! You might have expected an instance of Array. The error occurred while evaluating nil.[] I&#8217;ve decided to do a google search for the specific problem, as it was [...]]]></description>
			<content:encoded><![CDATA[<p>After spending some time trying to make a migration work, and having the error message coming back:</p>
<pre class="code">You have a nil object when you didn't expect it!
You might have expected an instance of Array.
The error occurred while evaluating nil.[]</pre>
<p>I&#8217;ve decided to do a google search for the specific problem, as it was working fine with other test migrations.</p>
<p>It turns out that if the migration is not model specific, but a different one (ie trying to add a new column to an existing table), the :int for the column doesn&#8217;t work!<br />
It has to be :integer.<br />
Full bug report and the article are here:<br />
<a href="http://dev.rubyonrails.org/ticket/9870">Migrations: :integer works, :int doesn&#8217;t &#8211; datatype discrepancy</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.42.mach7x.com/2007/11/05/int-and-integer-problem-in-ruby-on-rails-migration/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

