Installazione di produzione su 3.4.0.beta2-dev che non riesce ad aggiornarsi a 3.4.0.beta2

If you use a standard install, then the Ruby version should already be much newer than that.

Can you try running

cd /var/discourse
git status