500 Error trying to upgrade discourse

It’s my VM and had this for probably 7 years now. Haven’t touch this in the past 2-3 years and I guess it all piled up.