update versions Ruby and Rails and adding new database - PostgreSQL

You have added ActiveRecord but still you have mongoid user model. Please rewrite it to ActiveRecord::Base model :)