From owner-freebsd-ruby@FreeBSD.ORG Fri Jan 29 01:54:44 2010 Return-Path: Delivered-To: freebsd-ruby@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3351F1065672; Fri, 29 Jan 2010 01:54:44 +0000 (UTC) (envelope-from astounding@gmail.com) Received: from mail-gx0-f209.google.com (mail-gx0-f209.google.com [209.85.217.209]) by mx1.freebsd.org (Postfix) with ESMTP id B94CE8FC0A; Fri, 29 Jan 2010 01:54:43 +0000 (UTC) Received: by gxk1 with SMTP id 1so1385344gxk.14 for ; Thu, 28 Jan 2010 17:54:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=wuzfRRM+rZ4gwwxysMyTMO4VKfdesFzrpQKIP89vNHA=; b=mbwcy3o5etoI7nZaI74CQyicuNH0RLVOwy6EG+wPI5AKcDzM/Apq81MgkKGzI79f2B +izt86L+xLxavRCx0zdExu/r/Mm+Jd8XZUdhJqHl6tY+NFYF6R/n71jBOQzYeXRyUGXZ UZuOWuVNFUasfSitdJ3UEpbyxvJw/Uo7kiB88= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=BQ7TyyZpAQPrgyHwhDel3hni6bGEnTu2IB6nVlP5nqhbJ3ENejFC60mhw5oN4y0SMa mhTM8DkvI+FugiaS82MSo7g2lfMICANBX7vVEUWI2UBh0RLHMHwet8eksIjnElusFdUl tV/q0+UZpvYSloJcdWpZLPL8R3Eo/drTtOhic= MIME-Version: 1.0 Received: by 10.100.52.9 with SMTP id z9mr138250anz.135.1264730082870; Thu, 28 Jan 2010 17:54:42 -0800 (PST) In-Reply-To: <20100128165027.f510a468.stas@FreeBSD.org> References: <20100128120819.a15e60e0.stas@FreeBSD.org> <20100128143157.e1fd05a4.stas@FreeBSD.org> <20100128165027.f510a468.stas@FreeBSD.org> Date: Thu, 28 Jan 2010 18:54:42 -0700 Message-ID: From: Aaron Gifford To: Stanislav Sedov , freebsd-ruby@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: Subject: Re: Ruby Gem Require LoadError (8-STABLE, Ruby 1.9.1) X-BeenThere: freebsd-ruby@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD-specific Ruby discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 Jan 2010 01:54:44 -0000 On Thu, Jan 28, 2010 at 5:50 PM, Stanislav Sedov wrote: > On Thu, 28 Jan 2010 17:11:53 -0700 > Aaron Gifford mentioned: > >> 2010/1/28 Stanislav Sedov said: >> > Oh, so you have ruby 1.9 as a default version? >> >> Yes, I manually symlinked all /usr/local/bin/*19 executables to make >> 1.9 my default ruby. =A0(I much prefer 1.9 :) >> > > Oh, that might be a problem. =A0Use RUBY_VER=3D1.9 in make.conf instead. I'll immediately give that a try. However, it seems that it ought NOT to be an issue, as I didn't symlink stuff until AFTER I built and installed ruby 1.9.1 AND all the ports (gems). Only THEN did I create the symlinks. Oh, okay. I get it. By default, the ruby based ports are expecting to be installed with 1.8, and even though the build and install WORKS with 1.9, since I did not set RUBY_VER to 1.9 in make.conf when I built them. So something somewhere is still thinking "1.8" whether or not 1.8 even existed (and it did not on my system). I just uninstalled all gems and ruby related ports, then rebuilt with RUBY_VER=3D1.9 in /etc/make.conf. NOTE: The net/ssh gem was rebuilt and reinstalled with the ports system. The mtik gem was directly installed with 'gem19 install mtik-3.0.1.gem' from the command-line. I wanted to see if installation method made a different. ALSO when make was building/installing the gems, I noted these lines in the output: =3D=3D=3D> Cleaning for rubygem-net-ssh-2.0.15 =3D=3D=3D> Vulnerability check disabled, database not found =3D=3D=3D> Extracting for rubygem-net-ssh-2.0.15 =3D> MD5 Checksum OK for rubygem/net-ssh-2.0.15.gem. =3D> SHA256 Checksum OK for rubygem/net-ssh-2.0.15.gem. =3D=3D=3D> rubygem-net-ssh-2.0.15 depends on file: /usr/local/bin/ruby19 = - found =3D=3D=3D> Patching for rubygem-net-ssh-2.0.15 =3D=3D=3D> rubygem-net-ssh-2.0.15 depends on file: /usr/local/bin/ruby19 = - found =3D=3D=3D> rubygem-net-ssh-2.0.15 depends on file: /usr/local/bin/ruby19 = - found =3D=3D=3D> Configuring for rubygem-net-ssh-2.0.15 =3D=3D=3D> Installing for rubygem-net-ssh-2.0.15 =3D=3D=3D> rubygem-net-ssh-2.0.15 depends on file: /usr/local/bin/ruby19 = - found =3D=3D=3D> Generating temporary packing list =3D=3D=3D> Checking if security/rubygem-net-ssh already installed /usr/bin/env /usr/local/bin/gem19 install -l --no-update-sources --no-ri --install-dir /usr/local/lib/ruby/gems/1.9 /var/ports/distfiles/rubygem/net-ssh-2.0.15.gem -- --build-args Successfully installed net-ssh-2.0.15 1 gem installed Installing RDoc documentation for net-ssh-2.0.15... =3D=3D=3D> Registering installation for rubygem-net-ssh-2.0.15 Looking at the above install, the 'gem19' install looks like I think it ought to. NOW FOR the BIG TEST: user@host:/home/user% irb19 irb(main):001:0> require 'net/ssh' LoadError: no such file to load -- net/ssh from (irb):1:in `require' from (irb):1 from /usr/local/bin/irb19:12:in `
' irb(main):002:0> require 'mtik' LoadError: no such file to load -- mtik from (irb):2:in `require' from (irb):2 from /usr/local/bin/irb19:12:in `
' irb(main):003:0> gem 'net-ssh' Gem::LoadError: Could not find RubyGem net-ssh (>=3D 0) from :244:in `push_gem_version_on_load_path' from :14:in `gem' from (irb):3 from /usr/local/bin/irb19:12:in `
' irb(main):004:0> gem 'mtik' Gem::LoadError: Could not find RubyGem mtik (>=3D 0) from :244:in `push_gem_version_on_load_path' from :14:in `gem' from (irb):4 from /usr/local/bin/irb19:12:in `
' irb(main):005:0> require 'rubygems' =3D> true irb(main):006:0> require 'mtik' LoadError: no such file to load -- mtik from (irb):6:in `require' from (irb):6 from /usr/local/bin/irb19:12:in `
' irb(main):007:0> require 'net/ssh' LoadError: no such file to load -- net/ssh from (irb):7:in `require' from (irb):7 from /usr/local/bin/irb19:12:in `
' irb(main):008:0> gem 'mtik' =3D> true irb(main):009:0> require 'mtik' =3D> true irb(main):010:0> require 'net/ssh' LoadError: no such file to load -- net/ssh from (irb):10:in `require' from (irb):10 from /usr/local/bin/irb19:12:in `
' irb(main):011:0> gem 'net-ssh' =3D> true irb(main):012:0> require 'net/ssh' =3D> true irb(main):013:0> Argh! The same problem. So I removed all ruby ports and tried yet again using RUBY_DEFAULT_VER=3D1.9 in /etc/make.conf. Output of the build looked similar (as above). And the end result was identical: all attempts to require the ports failed. A HA! This helps: GEM_HOME=3D/usr/local/lib/ruby/gems/1.9/ irb19 irb(main):001:0> require 'net/ssh' =3D> true So if I manually set $GEM_HOME, things work. Any ideas what might be happening, anyone? Aaron out. P.S. Thanks for your help, Stanislav. I appreciate your suggestions.