开发者

undefined method `to_sym' for nil:NilClass during a db:auto:migrate

I'm trying to run a db:auto:migrate in my system and it keep throwing the undefined method `to_sym' for nil开发者_开发技巧:NilClass whenever it gets to a column that uses a type of date. If I change the field to a datetime and run the migrate, it will change the field to a date with no errors. What is causing this problem. I have to keep changing the field type every time I want to run my migration.

The reason I'm using the date type instead of the datetime is because I am trying to output the date and Rails keeps adjusting the data for my time zone, which is giving out bad data.

Thank you.

Josh


This is because you named a column wrong and somehow the sql table got generated. I trying to get this fixed right now. This has happened before and I just rebuild the table.

For example, you might have spelled integer as integre and that messes up everything. That is what I did anyways.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜