Delete unneeded gems and trace the database.yml