That happens because ancestry
can't be nil
and it's a bad idea to change it manually because all the gem's behavior is based on this attribute. For such cases gem has another parent_id
attribute which you should use in your form.
There is a good explanation in gem's wiki how to build form using ancestry
Hope it helps