pacija said:
Can I just uninstall
lang/ruby19, install
lang/ruby18, reinstall all dependent ports and ports that depend on it, and reinstall gems?
I can't comment on the Gems part because I know near to nothing about Ruby itself, but the process should be quite doable.
However, I'd
strongly advice you to look into
ports-mgmt/portmaster, because it excels in jobs like this.
First you should double check which ports rely on your current Ruby installation;
pkg_info can help here with the
-R parameter. If you're already using
pkg then I can't be of much help since I hardly know anything about it right now.
From there on I suggest using
portmaster. Simply use it to install
lang/ruby18 (
# portmaster lang/ruby18
) and let it sort out the rest.
The beauty of
portmaster is that it can check and adjust (if necessary) any dependencies. It also honours strict choices you may have made. For example; I'm currently looking into
textproc/docproj-nojadetex and let
portmaster handle this. There is a dependency for
ghostscript but
portmaster clearly showed me up front that it was going to work with
print/ghostscript9-nox11 which I had already installed.
Another very important reason: backups. If you start replacing and messing with ports then
portmaster makes sure to make backup packages for the stuff you're replacing, thus making it relatively easy to roll back your changes if you need to.
Pardon the small side-step, but I honestly think it might help.
Anyway; your idea should be quite doable, even without
portmaster.