Date: Sat, 6 Jan 2018 14:17:23 -0800 From: Kevin Oberman <rkoberman@gmail.com> To: Yuri <yuri@rawbw.com> Cc: "ports@freebsd.org" <ports@freebsd.org> Subject: Re: Ruby version question Message-ID: <CAN6yY1vyZjikFGcJTocrpLoW94i6hpc0b=v1YasMAQCeSQzXrg@mail.gmail.com> In-Reply-To: <e9ab632a-be54-e061-824e-98efd28857ee@rawbw.com> References: <e9ab632a-be54-e061-824e-98efd28857ee@rawbw.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, Jan 6, 2018 at 1:41 PM, Yuri <yuri@rawbw.com> wrote: > In order to get a Ruby version, I run this command: > > > $ ruby -r rbconfig -e 'C = RbConfig::CONFIG' -e 'puts C["ruby_version"]' > > > 2.4 > > > However, on Ubuntu 17.10 the same command returns 2.3.0 (with the minor > version of zero). > > > My question is which one is correct, or "more correct"? Should it rather > be 2.4.0? Or both are correct? > > > I recommended one upstream maintainer to get the current ruby version > using this command, and then to use 'pkg-config ruby-${THIS_VERSION} > --libs', but he says that Ubuntu prints it in a different format. > > > 2.4 matches .pc file on FreeBSD, and doesn't on Ubuntu. > > Is this a bug on Ubuntu? On FreeBSD? > > > Yuri > You seem to assume that Ubuntu and FreeBSD both have the same version of Ruby installed. The current version in FreeBSD is 2.4.3. 2.3 is still available as lang/ruby23, but should only be used when some code won't work with 2.4. The Ubuntu system is still running 2.3. Have you checked for available upgrades? On FreeBSD you can get the current version of an installed package with the command "pkg info -E ruby". The trailing ",1" indicates that at some point ruby was rolled back for some reason, but it is not really a part of the version number. -- Kevin Oberman, Part time kid herder and retired Network Engineer E-mail: rkoberman@gmail.com PGP Fingerprint: D03FB98AFA78E3B78C1694B318AB39EF1B055683
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAN6yY1vyZjikFGcJTocrpLoW94i6hpc0b=v1YasMAQCeSQzXrg>