From owner-freebsd-ruby@FreeBSD.ORG Mon Jan 25 11:08:35 2010 Return-Path: Delivered-To: ruby@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DB2A510656CF for ; Mon, 25 Jan 2010 11:08:35 +0000 (UTC) (envelope-from owner-bugmaster@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id AF7F48FC27 for ; Mon, 25 Jan 2010 11:08:35 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.3/8.14.3) with ESMTP id o0PB8ZWC040143 for ; Mon, 25 Jan 2010 11:08:35 GMT (envelope-from owner-bugmaster@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.3/8.14.3/Submit) id o0PB8Zdx040141 for ruby@FreeBSD.org; Mon, 25 Jan 2010 11:08:35 GMT (envelope-from owner-bugmaster@FreeBSD.org) Date: Mon, 25 Jan 2010 11:08:35 GMT Message-Id: <201001251108.o0PB8Zdx040141@freefall.freebsd.org> X-Authentication-Warning: freefall.freebsd.org: gnats set sender to owner-bugmaster@FreeBSD.org using -f From: FreeBSD bugmaster To: ruby@FreeBSD.org Cc: Subject: Current problem reports assigned to ruby@FreeBSD.org 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: Mon, 25 Jan 2010 11:08:35 -0000 Note: to view an individual PR, use: http://www.freebsd.org/cgi/query-pr.cgi?pr=(number). The following is a listing of current problems submitted by FreeBSD users. These represent problem reports covering all versions including experimental development code and obsolete releases. S Tracker Resp. Description -------------------------------------------------------------------------------- o ports/141183 ruby ports/japanese/ruby-chasen update s ports/140880 ruby ports-mgmt/portupgrade: portversion confused with ezm3 o ports/140364 ruby ports-mgmt/portupgrade-devel: #! line substitution is o ports/140273 ruby ports-mgmt/portupgrade-devel chokes on bsdpan pkgs o ports/140008 ruby ports-mgmt/portupgrade: many papercut omissions on por o ports/138796 ruby [patch] - update converters/ruby-lv o ports/137958 ruby ports-mgmt/portupgrade fails with recursive dependency o ports/137708 ruby ports-mgmt/portupgrade: portupgrade -cRn is broken s ports/134714 ruby ports-mgmt/portupgrade deletes user data without quest o ports/134182 ruby ports-mgmt/portupgrade incorrectly handles manual reje o ports/131111 ruby ports-mgmt/portupgrade-devel: completely removes packa o ports/129930 ruby ports-mgmt/portupgrade - portinstall tries to install o ports/129891 ruby ports-mgmt/portupgrade fails to recognize variations o o ports/128881 ruby ports-mgmt/portupgrade backtrace o ports/127889 ruby ports-mgmt/portupgrade detects spurious failures and s o ports/127019 ruby ports-mgmt/portupgrade does not recognize fail conditi o ports/126140 ruby ports-mgmt/portupgrade runtime error o ports/125936 ruby ports-mgmt/portupgrade -R fails if BUILD_DEP's are not o ports/112818 ruby ports-mgmt/portupgrade -a fails with database error 19 problems total. From owner-freebsd-ruby@FreeBSD.ORG Thu Jan 28 19:59:39 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 92E0A1065670 for ; Thu, 28 Jan 2010 19:59:39 +0000 (UTC) (envelope-from astounding@gmail.com) Received: from mail-yx0-f202.google.com (mail-yx0-f202.google.com [209.85.210.202]) by mx1.freebsd.org (Postfix) with ESMTP id 4719A8FC0C for ; Thu, 28 Jan 2010 19:59:38 +0000 (UTC) Received: by yxe40 with SMTP id 40so961457yxe.28 for ; Thu, 28 Jan 2010 11:59:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:date:message-id:subject :from:to:content-type:content-transfer-encoding; bh=dnJXAVjb/2KfIa/9zs7Yxg7ISaA2MzQUR2gcpT008Xg=; b=ufuHsU2SyRVJGGqtv0/Y29XR+kM8EbUddVtaDExgjiGIwBb6zdbjeNVSQw0lM/mdMS k3KGFAxzlgZZ5jW/CBc4vnzfGxQVU9BX1c2oclMowA9wiFUhggfr/tAPTiLof8pn+zkE HWh2/bxU7Nt5csRwB/QdfXoorirT0QdGjjeXw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type :content-transfer-encoding; b=tzCPn+XheLH9t8SWpi6RrPdMNN8GD5NUjRwm+PVxEYGNkw1hPkmeKkU63YTu8ijafZ KYMnLANG/lH49q8m8FfDVeKy+iFfIHu4JnGUX+K3ruwW2ntK76sHDkcZa609mxrfm5Pr larsya/ou2d3O24psnwO7P29mWYoS8fW8DWXo= MIME-Version: 1.0 Received: by 10.100.208.1 with SMTP id f1mr14783721ang.108.1264707214282; Thu, 28 Jan 2010 11:33:34 -0800 (PST) Date: Thu, 28 Jan 2010 12:33:34 -0700 Message-ID: From: Aaron Gifford To: freebsd-ruby@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Subject: 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: Thu, 28 Jan 2010 19:59:39 -0000 Hi, I'm running a fresh install of FreeBSD 8-STABLE (installed then updated to STABLE as of 27 Jan. 2010). =A0All ports are freshly built and installed. THE PROBLEM: After installing Ruby 1.9.1 and several gems via the Ports collection, ruby scripts that use the gems fail to load: ------ #!/usr/local/bin/ruby19 require 'rubygems' require 'net/ssh' ... ------ The script fails with: ------ user@host:/home/user% ./script.rb ./script.rb:4:in `require': no such file to load -- net/ssh (LoadError) =A0 =A0 =A0 =A0from ./script.rb:4:in `
' ------ So of course I check my gems install: ------ user@host:/home/user% gem list --local *** LOCAL GEMS *** activerecord (2.3.4) activesupport (2.3.4) net-ssh (2.0.15) pg (0.8.0) sqlite3-ruby (1.2.5) user@host:/home/user# gem19 environment RubyGems Environment: =A0- RUBYGEMS VERSION: 1.3.1 =A0- RUBY VERSION: 1.9.1 (2009-12-07 patchlevel 376) [amd64-freebsd8] =A0- INSTALLATION DIRECTORY: /usr/local/lib/ruby/gems/1.9 =A0- RUBY EXECUTABLE: /usr/local/bin/ruby19 =A0- EXECUTABLE DIRECTORY: /usr/local/bin =A0- RUBYGEMS PLATFORMS: =A0 =A0- ruby =A0 =A0- amd64-freebsd-8 =A0- GEM PATHS: =A0 =A0 - /usr/local/lib/ruby/gems/1.9 =A0 =A0 - /home/user/.gem/ruby/1.9 =A0- GEM CONFIGURATION: =A0 =A0 - :update_sources =3D> true =A0 =A0 - :verbose =3D> true =A0 =A0 - :benchmark =3D> false =A0 =A0 - :backtrace =3D> false =A0 =A0 - :bulk_threshold =3D> 1000 =A0- REMOTE SOURCES: =A0 =A0 - http://gems.rubyforge.org/ user@host:/home/user% pkg_info | grep ruby ruby-1.9.1,1 =A0 =A0 =A0 =A0An object-oriented interpreted scripting langua= ge ruby19-iconv-1.9.1,1 An iconv wrapper class for Ruby ruby19-mysql-2.8.1 =A0Ruby module for accessing MySQL databases with a C AP= I like rubygem-activerecord-2.3.4_1 Object-relational mapping layer for Rails MVC Framework rubygem-activesupport-2.3.4_1 Utility classes and extension that are required by Rails MV rubygem-net-ssh-2.0.15 Non-interactive SSH processing rubygem-pg-0.8.0 =A0 =A0Ruby interface to PostgreSQL library rubygem-sqlite3-1.2.5 Ruby interface to the SQLite DB engine version 3 user@host:/home/user% uname -av FreeBSD host.example.org 8.0-STABLE FreeBSD 8.0-STABLE #0: Wed Jan 27 19:46:39 MST 2010 root@host.example.com:/usr/obj/usr/src/sys/GENERIC =A0amd64 user@host:/home/user% ------ ALL installed gems fail to load with the exact same error. =A0So I think, perhaps it's the FreeBSD port system gems that are bad. =A0I download a new gem and install it with the gem command (bypassing ports). =A0But when I try to require it, it fails with the exact same error. All of the installed gems (whether by ports or by direct gem install) are in the correct install location (/usr/local/lib/ruby/gems/1.9/) and are present. Then I learn this: ------ user@host:/home/user% irb19 irb(main):001:0> require 'rubygems' =3D> true irb(main):002:0> require 'net/ssh' LoadError: no such file to load -- net/ssh =A0 =A0 =A0 =A0from (irb):2:in `require' =A0 =A0 =A0 =A0from (irb):2 =A0 =A0 =A0 =A0from /usr/local/bin/irb:12:in `
' irb(main):003:0> require 'active_record' LoadError: no such file to load -- active_record =A0 =A0 =A0 =A0from (irb):3:in `require' =A0 =A0 =A0 =A0from (irb):3 =A0 =A0 =A0 =A0from /usr/local/bin/irb:12:in `
' irb(main):004:0> gem 'net-ssh' =3D> true irb(main):005:0> require 'net/ssh' =3D> true irb(main):006:0> require 'active_record' LoadError: no such file to load -- active_record =A0 =A0 =A0 =A0from (irb):6:in `require' =A0 =A0 =A0 =A0from (irb):6 =A0 =A0 =A0 =A0from /usr/local/bin/irb:12:in `
' irb(main):007:0> gem 'activerecord' =3D> true irb(main):008:0> require 'active_record' =3D> true irb(main):009:0> ------ Now THAT's interesting. =A0If I use the gem method before the require, the gem is found. =A0But ONLY after. Anyone have any ideas? Puzzled, Aaron out. From owner-freebsd-ruby@FreeBSD.ORG Thu Jan 28 20:07:51 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 72AFE106568D for ; Thu, 28 Jan 2010 20:07:51 +0000 (UTC) (envelope-from stas@FreeBSD.org) Received: from mx0.deglitch.com (backbone.deglitch.com [IPv6:2001:16d8:fffb:4::abba]) by mx1.freebsd.org (Postfix) with ESMTP id 1F0AE8FC1E for ; Thu, 28 Jan 2010 20:07:51 +0000 (UTC) Received: from orion.SpringDaemons.com (adsl-99-48-191-9.dsl.snfc21.sbcglobal.net [99.48.191.9]) by mx0.deglitch.com (Postfix) with ESMTPA id 326998FC51 for ; Thu, 28 Jan 2010 23:07:48 +0300 (MSK) Received: from orion (localhost [127.0.0.1]) by orion.SpringDaemons.com (Postfix) with SMTP id E6FAD39C24 for ; Thu, 28 Jan 2010 12:08:19 -0800 (PST) Date: Thu, 28 Jan 2010 12:08:19 -0800 From: Stanislav Sedov To: freebsd-ruby@freebsd.org Message-Id: <20100128120819.a15e60e0.stas@FreeBSD.org> In-Reply-To: References: Organization: The FreeBSD Project X-Mailer: carrier-pigeon Mime-Version: 1.0 Content-Type: text/plain; charset=KOI8-R Content-Transfer-Encoding: quoted-printable 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: Thu, 28 Jan 2010 20:07:51 -0000 On Thu, 28 Jan 2010 12:33:34 -0700 Aaron Gifford mentioned: > Hi, >=20 > I'm running a fresh install of FreeBSD 8-STABLE (installed then > updated to STABLE as of 27 Jan. 2010). =9AAll ports are freshly built > and installed. >=20 > THE PROBLEM: > After installing Ruby 1.9.1 and several gems via the Ports collection, > ruby scripts that use the gems fail to load: >=20 I suspect that you installed gems for ruby 1.8, not ruby 1.9. Can you show the output of gem19 list? Also, for ruby19 you should not use 'require "rubygems"', just use plain re= quire. --=20 Stanislav Sedov ST4096-RIPE From owner-freebsd-ruby@FreeBSD.ORG Thu Jan 28 21:26:48 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 36D28106566B for ; Thu, 28 Jan 2010 21:26:48 +0000 (UTC) (envelope-from astounding@gmail.com) Received: from mail-yw0-f194.google.com (mail-yw0-f194.google.com [209.85.211.194]) by mx1.freebsd.org (Postfix) with ESMTP id DB62E8FC08 for ; Thu, 28 Jan 2010 21:26:47 +0000 (UTC) Received: by ywh32 with SMTP id 32so453870ywh.14 for ; Thu, 28 Jan 2010 13:26:46 -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=S04k7M0l98h1tzdqoTk8nRRRgjhq3N32fbhcPPg8CtE=; b=ac4VUirab9nmREoKiZedl2CLPLZw0WMskmPLwYJAaLmEH0PT8xaXu4Ng2BZZybdbeE +oAf0JD4DMlX5P2cpGMoS/7ai4kwiBzfDlH2GibGpkxhmFFungudORPnx5YuO4Sl9uo+ luX6qonly/2i4/OmANJzYiM0/c+8sDsEjR+BU= 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=HHfh0MrFwOtYw45GUwNij0nm3OqMjaRAJApq8pUoZkmW0S1mcOjtkMQTebODPw2IFc Nxqae0RIXfeIQP3O2qf8kiZWifZncl4EuLhgGaxFoOv8dOUJsde1HxMfyTz1SLY5FyS/ 19u+5zQ+tLQ0N8PRoDaBGva94rKeW/moXVqeY= MIME-Version: 1.0 Received: by 10.101.130.35 with SMTP id h35mr871729ann.109.1264714006792; Thu, 28 Jan 2010 13:26:46 -0800 (PST) In-Reply-To: <20100128120819.a15e60e0.stas@FreeBSD.org> References: <20100128120819.a15e60e0.stas@FreeBSD.org> Date: Thu, 28 Jan 2010 14:26:46 -0700 Message-ID: From: Aaron Gifford To: freebsd-ruby@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable 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: Thu, 28 Jan 2010 21:26:48 -0000 2010/1/28 Stanislav Sedov responded: > I suspect that you installed gems for ruby 1.8, not ruby 1.9. =A0Can you = show > the output of gem19 list? On the system in question gem is a symlink to gem19 (ruby version 1.8 is NOT installed on the system.), so the "gem list" shown in my original post is the output of gem19. > > Also, for ruby19 you should not use 'require "rubygems"', just use plain = require. Heh, yes, old habits are hard to break. I keep that unnecessary require around because much of my stuff has to be both 1.8 and 1.9 compatible. :) Aaron out. From owner-freebsd-ruby@FreeBSD.ORG Thu Jan 28 22:31:28 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 446531065670 for ; Thu, 28 Jan 2010 22:31:28 +0000 (UTC) (envelope-from stas@FreeBSD.org) Received: from mx0.deglitch.com (backbone.deglitch.com [IPv6:2001:16d8:fffb:4::abba]) by mx1.freebsd.org (Postfix) with ESMTP id E4A858FC08 for ; Thu, 28 Jan 2010 22:31:27 +0000 (UTC) Received: from orion.SpringDaemons.com (unknown [99.48.191.9]) by mx0.deglitch.com (Postfix) with ESMTPA id DA8638FC4E; Fri, 29 Jan 2010 01:31:25 +0300 (MSK) Received: from orion (localhost [127.0.0.1]) by orion.SpringDaemons.com (Postfix) with SMTP id 4C5EB39C24; Thu, 28 Jan 2010 14:31:57 -0800 (PST) Date: Thu, 28 Jan 2010 14:31:57 -0800 From: Stanislav Sedov To: Aaron Gifford Message-Id: <20100128143157.e1fd05a4.stas@FreeBSD.org> In-Reply-To: References: <20100128120819.a15e60e0.stas@FreeBSD.org> Organization: The FreeBSD Project X-Mailer: carrier-pigeon Mime-Version: 1.0 Content-Type: text/plain; charset=KOI8-R Content-Transfer-Encoding: quoted-printable Cc: freebsd-ruby@freebsd.org 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: Thu, 28 Jan 2010 22:31:28 -0000 On Thu, 28 Jan 2010 14:26:46 -0700 Aaron Gifford mentioned: > 2010/1/28 Stanislav Sedov responded: > > I suspect that you installed gems for ruby 1.8, not ruby 1.9. =9ACan yo= u show > > the output of gem19 list? >=20 > On the system in question gem is a symlink to gem19 (ruby version 1.8 > is NOT installed on the system.), so the "gem list" shown in my > original post is the output of gem19. Oh, so you have ruby 1.9 as a default version? > > > > Also, for ruby19 you should not use 'require "rubygems"', just use plai= n require. >=20 > Heh, yes, old habits are hard to break. I keep that unnecessary > require around because much of my stuff has to be both 1.8 and 1.9 > compatible. :) >=20 Weird, it should work with 'require "rubygems"' as well. I'll try to check at the evening. Maybe something got broken after the last update. --=20 Stanislav Sedov ST4096-RIPE From owner-freebsd-ruby@FreeBSD.ORG Fri Jan 29 00:11:55 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 E9B411065672 for ; Fri, 29 Jan 2010 00:11:54 +0000 (UTC) (envelope-from astounding@gmail.com) Received: from mail-yw0-f194.google.com (mail-yw0-f194.google.com [209.85.211.194]) by mx1.freebsd.org (Postfix) with ESMTP id 7CBFB8FC12 for ; Fri, 29 Jan 2010 00:11:54 +0000 (UTC) Received: by ywh32 with SMTP id 32so586962ywh.14 for ; Thu, 28 Jan 2010 16:11:53 -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; bh=0GU/xgkXiBztFfeDGDAzX4IWgcQxZ3VwRynFDUmk2hg=; b=wuPts6j4//wIVhIt8chO0ONRvGzILlG1hj3G/NRa7l3rWvW2Yf7piaZ9ZRkoKcE/H6 HtelNwszpSuSF2CiJ/BiRq+Oks6vS0cbQe2YQUNuGI25VVti3hzVD1UECS25AXg9ENqh ubDEPm4DvKf/gEHx4F/7pQ1s8/gKigCriYAlc= 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; b=vTU5xJaPknHTmmzKnu4TMv7y2QJGFsxPVFlvia5BtxbRUcO9f8M0p09xW8jKunfzss kbnGuqrctzuRr7Z0PZYfn76Kyrvp9E/S1bPiDLCtfjH+ITT0t+/cHZhMGpMRLEJtPhhg 4x9bzDPN/a7WtjkrWX7dwr+6GjL1tomj5b0RE= MIME-Version: 1.0 Received: by 10.100.235.36 with SMTP id i36mr54979anh.104.1264723913592; Thu, 28 Jan 2010 16:11:53 -0800 (PST) In-Reply-To: <20100128143157.e1fd05a4.stas@FreeBSD.org> References: <20100128120819.a15e60e0.stas@FreeBSD.org> <20100128143157.e1fd05a4.stas@FreeBSD.org> Date: Thu, 28 Jan 2010 17:11:53 -0700 Message-ID: From: Aaron Gifford To: Stanislav Sedov , freebsd-ruby@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 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 00:11:55 -0000 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. (I much prefer 1.9 :) > Weird, it should work with 'require "rubygems"' as well. 1.8? Really? I didn't know... I've just always required it since whatever version I used needed it for any gems to work right (I don't recall what version). Thanks for the info. > I'll try to check at the evening. > Maybe something got broken after the last update. One other thing that could be the culprit: on my system, all builds happen within a "build" jail: 1) Create new jail from the most recent world in /usr/obj (a build of 8.0-RELEASE was in /usr/obj, or an earlier 8-STABLE build) as described in 'man jail' (i.e. make installworld DESTDIR=/path && make distribution DESTDIR=/path) 2) Mount (using nullfs) both /usr/obj and /usr/src within the new jail 3) Within the new jail, update /usr/src to the latest source, clean out /usr/obj, mergemaster, then make buildworld 4) Outside of the jail, mergemaster, make installkernel, reboot, make installworld, then clean up any old config. files, etc. 5) Totally wipe out the build jail in #1 and create a NEW jail (same as #1) using the newest /usr/obj build 6) Enter the jail (which should now be a FRESH and UP-TO-DATE CLEAN install of 8-STABLE, with ZERO left-over old files or config. files anywhere) and rebuild all ports I need (creating packages of each for later installation in other jails, on the main system, and other systems) I wonder if this unusual process of building ports within a jail somehow is freaking things out somewhere... In theory, it SHOULD work transparently, identically to building outside of a jail. And to my knowledge, no other ports or system binaries behave any differently. It should also give me CLEANER builds as my jail build environment won't be polluted with any configuration changes that my base system has. Not knowing enough about ruby's gem loading/building/require system, I don't know where to go looking myself. If I knew more of how require worked in conjunction with gems, maybe I would have found the problem already. Thanks for any/all info. Aaron out. From owner-freebsd-ruby@FreeBSD.ORG Fri Jan 29 00:50:03 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 EA5AF1065672; Fri, 29 Jan 2010 00:50:03 +0000 (UTC) (envelope-from stas@FreeBSD.org) Received: from mx0.deglitch.com (backbone.deglitch.com [IPv6:2001:16d8:fffb:4::abba]) by mx1.freebsd.org (Postfix) with ESMTP id 8A8298FC16; Fri, 29 Jan 2010 00:50:03 +0000 (UTC) Received: from orion.SpringDaemons.com (adsl-99-48-191-9.dsl.snfc21.sbcglobal.net [99.48.191.9]) by mx0.deglitch.com (Postfix) with ESMTPA id 2706B8FC4E; Fri, 29 Jan 2010 03:50:01 +0300 (MSK) Received: from orion (localhost [127.0.0.1]) by orion.SpringDaemons.com (Postfix) with SMTP id 9ABA539C24; Thu, 28 Jan 2010 16:50:32 -0800 (PST) Date: Thu, 28 Jan 2010 16:50:27 -0800 From: Stanislav Sedov To: Aaron Gifford Message-Id: <20100128165027.f510a468.stas@FreeBSD.org> In-Reply-To: References: <20100128120819.a15e60e0.stas@FreeBSD.org> <20100128143157.e1fd05a4.stas@FreeBSD.org> Organization: The FreeBSD Project X-Mailer: carrier-pigeon Mime-Version: 1.0 Content-Type: multipart/signed; protocol="application/pgp-signature"; micalg="PGP-SHA1"; boundary="Signature=_Thu__28_Jan_2010_16_50_27_-0800_ta6KOCEVxkKPgMib" Cc: freebsd-ruby@freebsd.org 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 00:50:04 -0000 --Signature=_Thu__28_Jan_2010_16_50_27_-0800_ta6KOCEVxkKPgMib Content-Type: text/plain; charset=US-ASCII Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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? >=20 > Yes, I manually symlinked all /usr/local/bin/*19 executables to make > 1.9 my default ruby. (I much prefer 1.9 :) >=20 Oh, that might be a problem. Use RUBY_VER=3D1.9 in make.conf instead. --=20 Stanislav Sedov ST4096-RIPE --Signature=_Thu__28_Jan_2010_16_50_27_-0800_ta6KOCEVxkKPgMib Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- iQIcBAEBAgAGBQJLYjDYAAoJEL8lojEJL9nwWYUP/inu/1CASSHzvMHzuoJAqTPh Vsw0v3TcUpEfxX9KLvE7PjSAl/RD9/to3coooPPdrh5b4eb2aFG8SjV0jHZhYnqb H4z3HqMhEtb3cODJrmaeueqBiUhoWR2dnpb4CPmWdDzV6++nbWQpKFJ52WnQV3CN 6HhHdBdn2GcApPAMqkcewRn1Cq8LgLZgA4YDYX7oCZnJ+DUt91JyRWu/xiYrjcKv PQD6raCfvkZFo7WC3Ba3GiJGP3prvZtRwIVK1HUZg5e7zt9+uxfsjyqsf5MnCa8y NYiT2RRkAG7XwwgX4I7eYyR/Tn7PAmbmdtPTkASFA4Bhzb3Y3SZxNmoJEZuJQE7W X4i9pefby3pQ9KBFDHeMnZK3+tGm4x2JkwBGCAKhLDe8LZaf2Hvka1Y1q1EiVPJn j2kxeH9c0880826WasDPVsnb7/4HmDYCbG4HM9uBRiVCOZ2nqe3GaR520sUztNkh WY4b+LjQ+CEKWZm0dGO74sawkn2v0zsq1g+q22f9IiHc7CJ8SSPEdDtEMwDCFrWE 2daaXURf35XDQ59otl2oNn+1uArSZjCocl5r62kQNXR76jAkRgNgM4hwOjx6GQXc x7HqaNzv15dm1I4XvJHGC2dNUYVx9bX4kof60rqMzV3h9VmcVcWP6LH0HXwvihim s7xVAnbRUTRBqwopGZ3L =q6dh -----END PGP SIGNATURE----- --Signature=_Thu__28_Jan_2010_16_50_27_-0800_ta6KOCEVxkKPgMib-- 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. From owner-freebsd-ruby@FreeBSD.ORG Fri Jan 29 02:05:23 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 EF3FC106566C for ; Fri, 29 Jan 2010 02:05:23 +0000 (UTC) (envelope-from astounding@gmail.com) Received: from mail-yx0-f202.google.com (mail-yx0-f202.google.com [209.85.210.202]) by mx1.freebsd.org (Postfix) with ESMTP id 67E048FC12 for ; Fri, 29 Jan 2010 02:05:23 +0000 (UTC) Received: by yxe40 with SMTP id 40so1259998yxe.28 for ; Thu, 28 Jan 2010 18:05:22 -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; bh=y6WowgcC/H9zUsoGDP4IHWnv5/9rgtnJN53Mz6+aeNo=; b=hPHF86X6z62kE+1JLWuLHAFDEfXyg7ySdeB9ThzR4CQKu4YnCG9iiA5tvkCWvgltWe c35nmvT9NhrkJ20NLkcOHxYjI+z+nTKaeKt/SCMn/EJM6PAQylI7p/SqCzDPjnKHhrH8 Ju5k1E6M+IDAqvjcJfcjx8F+di2xs8MbY9F+w= 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; b=jN55m/z6xwaWac/p0pY6+ROy0NjjI+ny4jGLhN4w3K1G1YHDJGar47cLubytoWh+DV FmtPtIfVMG1dkrDTHkVyjChiybarUzTheEVnZpiwxf9wl8aXohK9JELz+w0OWwXhpSxg 4iG/eE4XDEhTYOICWU2LWArgYta0cimrlbqkQ= MIME-Version: 1.0 Received: by 10.101.193.32 with SMTP id v32mr192566anp.8.1264730722583; Thu, 28 Jan 2010 18:05:22 -0800 (PST) In-Reply-To: References: <20100128120819.a15e60e0.stas@FreeBSD.org> <20100128143157.e1fd05a4.stas@FreeBSD.org> <20100128165027.f510a468.stas@FreeBSD.org> Date: Thu, 28 Jan 2010 19:05:22 -0700 Message-ID: From: Aaron Gifford To: freebsd-ruby@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 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 02:05:24 -0000 I wrote: > A HA! > > This helps: > > GEM_HOME=/usr/local/lib/ruby/gems/1.9/ irb19 > irb(main):001:0> require 'net/ssh' > => true > > So if I manually set $GEM_HOME, things work. > > Any ideas what might be happening, anyone? > > Aaron out. One more interesting thing: % ruby19 -e 'p Gem.default_dir' "/usr/local/lib/ruby19/gems/1.9" That is NOT right. It should be "/usr/local/lib/ruby/gems/1.9" instead. Where does Gem.default_dir get set, does anyone know? Aaron out. From owner-freebsd-ruby@FreeBSD.ORG Fri Jan 29 02:25:07 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 75245106566B for ; Fri, 29 Jan 2010 02:25:07 +0000 (UTC) (envelope-from astounding@gmail.com) Received: from mail-yw0-f194.google.com (mail-yw0-f194.google.com [209.85.211.194]) by mx1.freebsd.org (Postfix) with ESMTP id 1E3E98FC18 for ; Fri, 29 Jan 2010 02:25:06 +0000 (UTC) Received: by ywh32 with SMTP id 32so684886ywh.14 for ; Thu, 28 Jan 2010 18:25:06 -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=SlwiOKaRKycZsgYsqyq2rOxPfQJZt1oLLXSXmXYEmLo=; b=RNZNVR53kg26Ma/qstAPlr07N6YnxJ6EJdFS7gwn7r23/5ouPsQMD7KOvQ/6r0a7Vx CDzlFa7yc1Uq5JIwA3I5kj8hxKtYF7TuC3IqYLcpPCbTILFRoFJIkucMOhyf4vObxVFt wiqKecRYBLh4zY6dKENWSd5SENEg6q8/5JaxA= 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=Wm5QguRXc7Uq2/m3rAoF6v3K0bXJweJSBz7JJJ9PwlViqqgYdtdsTS3A+s9NCRB5AY j1QSbelqJwmBLB3/NMvOBTyoqI7gk1AZ1CB/pZnBPcCcM+Y7ihq5/iiTrBZ6ofv/JJwJ dhQMPxUjyyCYMP2TxMdMojCuCHt5Q3JRxRFUk= MIME-Version: 1.0 Received: by 10.101.129.29 with SMTP id g29mr130562ann.231.1264731906374; Thu, 28 Jan 2010 18:25:06 -0800 (PST) In-Reply-To: References: <20100128120819.a15e60e0.stas@FreeBSD.org> <20100128143157.e1fd05a4.stas@FreeBSD.org> <20100128165027.f510a468.stas@FreeBSD.org> Date: Thu, 28 Jan 2010 19:25:06 -0700 Message-ID: From: Aaron Gifford To: freebsd-ruby@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable 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 02:25:07 -0000 I wrote: > One more interesting thing: > > % ruby19 -e 'p Gem.default_dir' > "/usr/local/lib/ruby19/gems/1.9" > > That is NOT right. =A0It should be "/usr/local/lib/ruby/gems/1.9" instead= . > > Where does Gem.default_dir get set, does anyone know? > > Aaron out. It looks like gem_prelude.rb sets up the gems include path. The relevant code section is: def self.default_dir File.join File.dirname(ConfigMap[:sitedir]), 'Gems', ConfigMap[:ruby_version] elsif RUBY_VERSION > '1.9' then File.join(ConfigMap[:libdir], ConfigMap[:ruby_install_name], 'gems'= , ConfigMap[:ruby_version]) else File.join(ConfigMap[:libdir], ruby_engine, 'gems', ConfigMap[:ruby_version]) end end So the Gem.default_dir is being set to: File.join(ConfigMap[:libdir], ConfigMap[:ruby_install_name], 'gems', ConfigMap[:ruby_version]) (that's the middle "RUBY_VERSION > '1.9'" code chunk) So ConfigMap[:ruby_install_name] is "ruby19" in this case, and THAT's what is screwing this up. IDEAS: Either the FreeBSD Ruby 1.9 port needs to install things in "/usr/local/lib/ruby19" instead of "/usr/local/lib/ruby/" so the code will work as-is, or else something's gotta change with ConfigMap[:ruby_install_name], or else gem_prelude.rb code has to be changed... So... anyone with expertise, where does one go from here? Aaron out. From owner-freebsd-ruby@FreeBSD.ORG Fri Jan 29 04:50:41 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 5AE44106566B for ; Fri, 29 Jan 2010 04:50:41 +0000 (UTC) (envelope-from astounding@gmail.com) Received: from mail-yw0-f194.google.com (mail-yw0-f194.google.com [209.85.211.194]) by mx1.freebsd.org (Postfix) with ESMTP id 1C29A8FC14 for ; Fri, 29 Jan 2010 04:50:40 +0000 (UTC) Received: by ywh32 with SMTP id 32so778869ywh.14 for ; Thu, 28 Jan 2010 20:50:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:date:message-id:subject :from:to:content-type:content-transfer-encoding; bh=DzS0YOZxbRiKtNPGmZbQ0nDxAUNgqXm1hKSEX20yIYY=; b=w1Qio6FhZ2HK4Jr4zqlRZ5W+tW0VuU77Ap7e3WS21uea2vc5BraOsB0OB0V5IPI7Jr 7k6GkNZY47OcXR0HRe4MX70qQL7Mg7pj7B+JOyHFdcVx9LxyNKEQFSktzTj/NeulVcCP lk0dryn9mRUe2TC02LFD5H6nWXDp0QHgP4+g8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type :content-transfer-encoding; b=DB2711SaDeDOCbsE6Y8hZIAQYH0cdxkLUN/fMuFpKyagI6JWDdThpvt+O3FCvYlbMd jGpU4rshAgtPBkGlBLSh2IBbkwhUV0uCD5fZe2XIpiYIaFC0N5S4s/XcaO5Kxg1019Af lv/MwBrV5iPrD50CdcgsYNzcAiCkzN7+eYbkY= MIME-Version: 1.0 Received: by 10.101.193.32 with SMTP id v32mr350623anp.8.1264740640484; Thu, 28 Jan 2010 20:50:40 -0800 (PST) Date: Thu, 28 Jan 2010 21:50:40 -0700 Message-ID: From: Aaron Gifford To: freebsd-ruby@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Subject: Solved: 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 04:50:41 -0000 On Thu, Jan 28, 2010 at 7:25 PM, Aaron Gifford wrote= : > =A0I wrote: >> One more interesting thing: >> >> % ruby19 -e 'p Gem.default_dir' >> "/usr/local/lib/ruby19/gems/1.9" >> >> That is NOT right. =A0It should be "/usr/local/lib/ruby/gems/1.9" instea= d. >> >> Where does Gem.default_dir get set, does anyone know? >> >> Aaron out. > > It looks like gem_prelude.rb sets up the gems include path. > > The relevant code section is: > > =A0def self.default_dir > =A0 =A0 =A0 =A0File.join File.dirname(ConfigMap[:sitedir]), 'Gems', > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0ConfigMap[:ruby_version] > =A0 =A0 =A0elsif RUBY_VERSION > '1.9' then > =A0 =A0 =A0 =A0File.join(ConfigMap[:libdir], ConfigMap[:ruby_install_name= ], 'gems', > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0ConfigMap[:ruby_version]) > =A0 =A0 =A0else > =A0 =A0 =A0 =A0File.join(ConfigMap[:libdir], ruby_engine, 'gems', > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0ConfigMap[:ruby_version]) > =A0 =A0 =A0end > =A0 =A0end > > So the Gem.default_dir is being set to: > =A0File.join(ConfigMap[:libdir], ConfigMap[:ruby_install_name], 'gems', > ConfigMap[:ruby_version]) > > (that's the middle "RUBY_VERSION > '1.9'" code chunk) > > So ConfigMap[:ruby_install_name] is "ruby19" in this case, and THAT's > what is screwing this up. > > > > IDEAS: > > Either the FreeBSD Ruby 1.9 port needs to install things in > "/usr/local/lib/ruby19" instead of "/usr/local/lib/ruby/" so the code > will work as-is, or else something's gotta change with > ConfigMap[:ruby_install_name], or else gem_prelude.rb code has to be > changed... > > So... anyone with expertise, where does one go from here? > > Aaron out. It looks like ConfigMap[:ruby_install_name] gets set earlier in the same gem_prelude.rb code to RbConfig::CONFIG["ruby_install_name"] which in turn is set in rbconfig.rb which sets it to "ruby19". That file is autogenerated during the build process by the mkconfig.rb script which gets passed an "install_name" variable setting I'm assuming. That in turn gets set during make. The Makefile shows: $(RBCONFIG): $(srcdir)/mkconfig.rb config.status $(PREP) @$(MINIRUBY) $(srcdir)/mkconfig.rb -timestamp=3D$@ \ -install_name=3D$(RUBY_INSTALL_NAME) \ -so_name=3D$(RUBY_SO_NAME) rbconfig.rb So it's getting set to the RUBY_INSTALL_NAME value 'ruby19'. Of course Makefile is created from the Makefile.in template by the GNU Autoconf configure process. The configure.in template shows RUBY_INSTALL_NAME getting set to: RUBY_INSTALL_NAME=3D"${ri_prefix}ruby${ri_suffix}" That explains completely how Gem.default_dir is getting set to ""/usr/local/lib/ruby19/gems/1.9" instead of the actual path "/usr/local/lib/ruby/gems/1.9" ONE POSSIBLE FIX is this patch to gem_prelude.rb (in /usr/ports/lang/ruby19/files/patch-gem_prelude.rb): =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- gem_prelude.rb.orig 2010-01-28 21:22:27.307910440 -0700 +++ gem_prelude.rb 2010-01-28 21:22:43.177946726 -0700 @@ -116,7 +116,7 @@ File.join File.dirname(ConfigMap[:sitedir]), 'Gems', ConfigMap[:ruby_version] elsif RUBY_VERSION > '1.9' then - File.join(ConfigMap[:libdir], ConfigMap[:ruby_install_name], 'gems= ', + File.join(ConfigMap[:libdir], 'ruby', 'gems', ConfigMap[:ruby_version]) else File.join(ConfigMap[:libdir], ruby_engine, 'gems', =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D This works. Building/installing gems under 1.9.1 (with RUBY_VERSION=3D1.9.1 in /etc/make.conf) did not break (still works), but this time, no LoadErrors during require. AT LAST! user@host:/home/user% irb19 irb(main):001:0> require 'net/ssh' =3D> true irb(main):002:0> And that makes ruby19 -e 'p Gem.default_dir' output "/usr/local/lib/ruby/gems/1.9" like it should. Aaron out. From owner-freebsd-ruby@FreeBSD.ORG Fri Jan 29 05:27:59 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 157A1106566B for ; Fri, 29 Jan 2010 05:27:59 +0000 (UTC) (envelope-from stas@FreeBSD.org) Received: from mx0.deglitch.com (backbone.deglitch.com [IPv6:2001:16d8:fffb:4::abba]) by mx1.freebsd.org (Postfix) with ESMTP id 88D368FC08 for ; Fri, 29 Jan 2010 05:27:58 +0000 (UTC) Received: from [192.168.1.2] (c-71-198-20-159.hsd1.ca.comcast.net [71.198.20.159]) by mx0.deglitch.com (Postfix) with ESMTPSA id A304D8FC4E; Fri, 29 Jan 2010 08:27:55 +0300 (MSK) Message-Id: <5C9D0969-7B42-4788-AFB9-303772A0043F@FreeBSD.org> From: Stanislav Sedov To: Aaron Gifford In-Reply-To: Content-Type: multipart/mixed; boundary=Apple-Mail-3-820347370 Mime-Version: 1.0 (Apple Message framework v936) Date: Thu, 28 Jan 2010 21:27:52 -0800 References: X-Mailer: Apple Mail (2.936) Cc: freebsd-ruby@freebsd.org Subject: Re: Solved: 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 05:27:59 -0000 --Apple-Mail-3-820347370 Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit On Jan 28, 2010, at 8:50 PM, Aaron Gifford wrote: > > It looks like ConfigMap[:ruby_install_name] gets set earlier in the > same gem_prelude.rb code to RbConfig::CONFIG["ruby_install_name"] > which in turn is set in rbconfig.rb which sets it to "ruby19". That > file is autogenerated during the build process by the mkconfig.rb > script which gets passed an "install_name" variable setting I'm > assuming. > > That in turn gets set during make. The Makefile shows: > $(RBCONFIG): $(srcdir)/mkconfig.rb config.status $(PREP) > @$(MINIRUBY) $(srcdir)/mkconfig.rb -timestamp=$@ \ > -install_name=$(RUBY_INSTALL_NAME) \ > -so_name=$(RUBY_SO_NAME) rbconfig.rb > > So it's getting set to the RUBY_INSTALL_NAME value 'ruby19'. Of > course Makefile is created from the Makefile.in template by the GNU > Autoconf configure process. The configure.in template shows > RUBY_INSTALL_NAME getting set to: > > RUBY_INSTALL_NAME="${ri_prefix}ruby${ri_suffix}" > > That explains completely how Gem.default_dir is getting set to > ""/usr/local/lib/ruby19/gems/1.9" instead of the actual path > "/usr/local/lib/ruby/gems/1.9" > > ONE POSSIBLE FIX is this patch to gem_prelude.rb (in > /usr/ports/lang/ruby19/files/patch-gem_prelude.rb): > ======================== > --- gem_prelude.rb.orig 2010-01-28 21:22:27.307910440 -0700 > +++ gem_prelude.rb 2010-01-28 21:22:43.177946726 -0700 > @@ -116,7 +116,7 @@ > File.join File.dirname(ConfigMap[:sitedir]), 'Gems', > ConfigMap[:ruby_version] > elsif RUBY_VERSION > '1.9' then > - File.join(ConfigMap[:libdir], > ConfigMap[:ruby_install_name], 'gems', > + File.join(ConfigMap[:libdir], 'ruby', 'gems', > ConfigMap[:ruby_version]) > else > File.join(ConfigMap[:libdir], ruby_engine, 'gems', > ======================== > > This works. Building/installing gems under 1.9.1 (with > RUBY_VERSION=1.9.1 in /etc/make.conf) did not break (still works), but > this time, no LoadErrors during require. AT LAST! > Hi, Aaron! Thank you a lot for you analysis! Your patch looks good! But I think we could just probably remove the 1.9 specific if clause here, so ruby 1.9 will behave exactly like ruby 1.8 here. Can you test if the following patch works for you? Thanks! --Apple-Mail-3-820347370 Content-Disposition: attachment; filename=ruby19.diff Content-Type: application/octet-stream; x-unix-mode=0644; name="ruby19.diff" Content-Transfer-Encoding: 7bit Index: Mk/bsd.ruby.mk =================================================================== RCS file: /home/pcvs/ports/Mk/bsd.ruby.mk,v retrieving revision 1.192 diff -u -r1.192 bsd.ruby.mk --- Mk/bsd.ruby.mk 6 Jan 2010 06:31:20 -0000 1.192 +++ Mk/bsd.ruby.mk 29 Jan 2010 05:23:12 -0000 @@ -198,7 +198,7 @@ # Ruby 1.9 # RUBY_RELVERSION= 1.9.1 -RUBY_PORTREVISION= 0 +RUBY_PORTREVISION= 1 RUBY_PORTEPOCH= 1 RUBY_PATCHLEVEL= 376 Index: lang/ruby19/files/patch-gem_prelude.rb =================================================================== RCS file: lang/ruby19/files/patch-gem_prelude.rb diff -N lang/ruby19/files/patch-gem_prelude.rb --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lang/ruby19/files/patch-gem_prelude.rb 29 Jan 2010 05:23:12 -0000 @@ -0,0 +1,12 @@ +--- gem_prelude.rb.orig 2010-01-29 08:19:47.000000000 +0300 ++++ gem_prelude.rb 2010-01-29 08:20:04.000000000 +0300 +@@ -115,9 +115,6 @@ + if defined? RUBY_FRAMEWORK_VERSION then + File.join File.dirname(ConfigMap[:sitedir]), 'Gems', + ConfigMap[:ruby_version] +- elsif RUBY_VERSION > '1.9' then +- File.join(ConfigMap[:libdir], ConfigMap[:ruby_install_name], 'gems', +- ConfigMap[:ruby_version]) + else + File.join(ConfigMap[:libdir], ruby_engine, 'gems', + ConfigMap[:ruby_version]) --Apple-Mail-3-820347370 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit --Apple-Mail-3-820347370-- From owner-freebsd-ruby@FreeBSD.ORG Fri Jan 29 07:14:26 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 EC65C1065676; Fri, 29 Jan 2010 07:14:26 +0000 (UTC) (envelope-from astounding@gmail.com) Received: from mail-yx0-f202.google.com (mail-yx0-f202.google.com [209.85.210.202]) by mx1.freebsd.org (Postfix) with ESMTP id 78B228FC14; Fri, 29 Jan 2010 07:14:26 +0000 (UTC) Received: by yxe40 with SMTP id 40so1439220yxe.28 for ; Thu, 28 Jan 2010 23:14:25 -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:cc:content-type :content-transfer-encoding; bh=bsc/6Ewnyp+whfg8EHazbpKeV7HV2CGZYVRdXie9ww0=; b=RNiL5x8JH7YCImTJpfRClNf75e23RgZYBozkGfxg5fjBzbWwIOr8OW+DiH3WjIHqt0 BUVYhJSo5I/2WtWaAnWyyR8bgb8Yx7sYjYjewYhQg8gSqxpoG/TD00BebeJE6NIKKKQW 2ELCIiApUfz6qJjamiSZpAe8nnhSV3ZgQub8g= 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 :cc:content-type:content-transfer-encoding; b=cT0C2fJmJg6ePzdIGmS7ZowaWq6pxh6PN1hExiyzcVJi+CXIheWFOwmjkhbxgHxJRv RqMWsFStdzUX0ZnMzd9FMom09qlzzhZGNnpWnxI0h+YPqCaQ0Lu18aZA+OVyQJESUyKQ o8NL2YWEPjGWEEtOQ8zc0zWh9Q3+85RRTHXm4= MIME-Version: 1.0 Received: by 10.100.224.8 with SMTP id w8mr409421ang.207.1264749265682; Thu, 28 Jan 2010 23:14:25 -0800 (PST) In-Reply-To: <5C9D0969-7B42-4788-AFB9-303772A0043F@FreeBSD.org> References: <5C9D0969-7B42-4788-AFB9-303772A0043F@FreeBSD.org> Date: Fri, 29 Jan 2010 00:14:25 -0700 Message-ID: From: Aaron Gifford To: Stanislav Sedov Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: freebsd-ruby@freebsd.org Subject: Re: Solved: 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 07:14:27 -0000 On Thu, Jan 28, 2010 at 10:27 PM, Stanislav Sedov wrote: > Hi, Aaron! > > Thank you a lot for you analysis! You are certainly welcome. > Your patch looks good! =A0But I think we could just probably remove the 1= .9 > specific if > clause here, so ruby 1.9 will behave exactly like ruby 1.8 here. =A0Can y= ou > test if the > following patch works for you? =A0Thanks! It works great! Thank you very much! FYI, I submitted a PR (see ports/143337) on the topic. Your patch should close it. Thank you for your help, Stanislav, I really appreciate it. Aaron out.