3.4.0.beta2-devのプロダクションインストールが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