Ruby-mri is consuming lots of memory

I have solved that issue. Different ruby versions create problem. Now i am facing another issue. Iam using PostgreSQL database, done all database entries through console. I am getting stuck on one statement “@user = login(params[:email],params[:password])” here @user has null value so that m getting Login failed message. I dont understand why @user have no values as database is connected with my application???