I had a server with a manual installation (local compilation -> ./configure && make; make install) of Ruby v1.9.2 and I needed to upgrade this to v1.9.3 – How did I do this?
Technically I didn’t… it worked out to be too much hassle long term to upgrade the manual installation on a production server so I installed Ruby Version Manager over the top which overwrote the underlying links to the previous version of Ruby. I believe it is best practise to use a version manager for Ruby such as RVM which not only allows you to manage Ruby versions server-wide but also per-project versions and gemsets.
The steps I took to install and use RVM were as follows;
- Check Ruby version
- Install Ruby Version Manager as per guide
- #rvm install which ever Ruby versions you require
- Sort out webserver configuration; for example point to new Ruby version or per project version
- Restart webserver
And thats it, also in future it is really easy to upgrade again by just letting RVM do the hard work.