fixed database issues and updated gems