Rails Migration undefined method `type=' for nil:NilClass

Just wanted to share a quick tip about an error I ran into. When running a Rails migration and changing a column that doesn’t exist, you’ll get an undefined method `type=' for nil:NilClass error. The cause for me was that I had used change_column on login, which my table didn’t have instead of email, which my table did.

Author: Daniel X

Heretic priest of the Machine God. I enjoy crawling around in Jeff Bezo's spaceship, bringing technology to the people, and long walks outside of time and space.

2 thoughts on “Rails Migration undefined method `type=' for nil:NilClass”

Leave a Reply to saeed jabbar Cancel reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: