downgrade ruby 19 to 18

Upgrade of Ruby broke a Rails app I am testing - Fedena, so I need to downgrade it.

Can I just uninstall lang/ruby19, install lang/ruby18, reinstall all dependent ports and ports that depend on it, and reinstall gems?
 
Did you follow the UPDATING to make the transition painless? Perhaps you forgot to rebuild the ports, that depend on it.
 
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.
 
I was thinking about this when solving a mess of my own (port vs. "slave" port): you should look into the -o option: "replace the installed port with a port from a different origin".

I never used this myself so I can't comment on how it will work, but it looks to me that this is exactly what you're after. If I'm right this would mean you can replace Ruby with one single command.
 
As I suspected, all you needed was check the UPDATING file (lines 23-55):

UPDATING said:
#
# Keep ruby 1.8 as default version
#
RUBY_DEFAULT_VER=1.8

Set this variable in your /etc/make.conf and rebuild all ports that depend on ruby again like it says in the UPDATING, but do it for lang/ruby18 instead. If you used ports-mgmt/portmaster to change the origin, I think you can change it back again. If you use ports-mgmt/portupgrade you don't have to worry about that annoyance ]ports-mgmt/portupgrade[/port] requires ruby as a dependency, so you have to be more careful when you update it, but then again, it's described in the UPDATING.
 
Back
Top