You should never set the ID on an ActiveRecord object like this. Remember the database autoincrements theses values itself so there's no need to set this ever.