Date: Tue, 3 Jan 2017 01:07:58 +0100 From: =?iso-8859-1?Q?Jos=E9_G=2E?= Juanino <jjuanino@gmail.com> To: freebsd-ruby@freebsd.org Subject: PREFIX enviroment variable pollutes gem search path Message-ID: <20170103000758.pnoglvxtseec2xpn@abel.home.inet>
next in thread | raw e-mail | index | archive | help
Hi, I am suffering an annoying issue loading gem libraries; I am not sure if it is FreeBSD specific. Install some gem, for example rubygem-test-unit-3.1.9, and take a look at the following code: $ ruby22 -r test/unit -e 'puts' $ PREFIX=1 ruby22 -r test/unit -ne 'puts' /usr/local/lib/ruby/site_ruby/2.2/rubygems/core_ext/kernel_require.rb:55:in `require': cannot load such file -- test/unit (LoadError) from /usr/local/lib/ruby/site_ruby/2.2/rubygems/core_ext/kernel_require.rb:55:in `require' In short: you cannot load any gem if your environment contains the PREFIX variable. When this happens, ruby uses the assigned value instead of /usr/local to search the proper files. This breaks a lot of existent code. The relevant ports are, installed via pkg: ruby-2.2.5_1,1 ruby22-gems-2.6.4 ruby23-2.3.1_1,1 The FreeBSD version is 11.0-RELEASE. This issue did not happen in ruby20, I think. Regards -- José G. Juanino
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20170103000758.pnoglvxtseec2xpn>