Your user model probably has validations which are not satisfied. Since you’ve not posted those I’m unable to really solve your question. To make live easier you can debug why your user isn’t willing to save.
Try running
user.errors.full_messages
which should give you a hint what’s going wrong.