I have installed the RailsTutorial sample app(the twitter like application) and am trying to understand why the following piece of console code does not update the database
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.