Even though symlinks are properly set up, the scripts in /usr/bin/rails don't know anything about their own version, so they just start the latest rails version: /usr/bin/rails-1.2.6 -v Rails 2.0.2 Originally reported in bug 221309
Created attachment 159371 [details, diff] Fixes to ebuilds for eselect This patch makes the /usr/bin/rails scripts version aware. It also allows the ebuilds to correctly up/downgrade without warnings.
Created attachment 159373 [details, diff] Fix for the eselect update action This patch is needed by the previous patch (https://bugs.gentoo.org/attachment.cgi?id=159371) because it defines the ebuild update action correctly, without specifying a target.
In case it isn't clear from those attachments, the attached patches solve the problem for me as well as fixing correct downgrading and removal of the package. The downgrading/removal problem is intertwined in the reported one, so I didn't report a seperate bug.
I just had a look at these changes. Do you think it would be possible to move the pkg_postrm() code mostly into the eclass so that we can just have a 'eselect rails update' there? Or is that not possible? I'd rather have this code in the eclass for easier maintenance. Other than that the approach looks fine, so my plan is to include this in CVS and than work towards stabilization of rails 2.1.0.
*** Bug 249518 has been marked as a duplicate of this bug. ***
Created attachment 173998 [details, diff] Patch to be applied against dev-ruby/rails/ in the Portage tree
Created attachment 173999 [details, diff] FWIW, updated patch for eselect-rails (old one is off by 1 line)
This has now been fixed in CVS, with eselect-rails-0.14 and the -r1 versions of rails 1.2.6, 2.0.5, 2.1.2, and 2.2.2.