Header_image
Jeremy Walker

Software Developer & Social Entrepreneur

Bug in Rails 3.2 ActiveRecord Store - TypeError: can't convert Symbol into Integer

Update: I've now fixed this and it's been merged into Rails core, so use the master branch is you're having this issue.

If you have a non-nullable database column that you are using for the db backing of the new ActiveRecord Store in Rails 3.2, you will probably get an error such as:

TypeError: can't convert Symbol into Integer
from .../activerecord-3.2.1/lib/active_record/store.rb:39:in `[]='

To fix it, change your column to :null => true

I've logged an issue report on github.

Share This Post

Comments

9292ee2ce3f54d153573be2c16b7bfe4

binbin

Me too! Can you help me, please!
Thank so much!

Post a Comment

I'd love to hear your thoughts :)