From owner-freebsd-ruby@freebsd.org Mon Dec 25 05:35:03 2017 Return-Path: Delivered-To: freebsd-ruby@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 13D92E9FE76 for ; Mon, 25 Dec 2017 05:35:03 +0000 (UTC) (envelope-from tj@a13.fr) Received: from mx6.a13.fr (mx6.a13.fr [IPv6:2001:41d0:2:7c1d::25]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D5BB977BC2 for ; Mon, 25 Dec 2017 05:35:02 +0000 (UTC) (envelope-from tj@a13.fr) Received: from klamath.a13.fr ([2001:7a8:b73c::13]) by mx6.a13.fr with esmtps (A13 MTA) (envelope-from ) id 1eTLPf-0002WT-EY; Mon, 25 Dec 2017 05:34:59 +0000 Received: from tj by klamath.a13.fr with local (A13 MTA) (envelope-from ) id 1eTLPc-000K44-Gr; Mon, 25 Dec 2017 05:34:56 +0000 Date: Mon, 25 Dec 2017 05:34:56 +0000 From: Thibault Jouan To: yac yac Cc: freebsd-ruby@freebsd.org Subject: Re: redmine + postgresql Message-ID: <20171225053456.GA47473@klamath.a13.fr> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.2 (2017-12-15) X-BeenThere: freebsd-ruby@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: FreeBSD-specific Ruby discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Dec 2017 05:35:03 -0000 Hello, On 2017-12-03 01:00:47 +0100, yac yac wrote: > I just installed $SUBJ but I had to patch redmine Gemfile since it stated > "pg" ~> "0.18.1" while we have 0.21 in ports. > > What is the proper solution to this problem? IMHO the version requirement could be simplified upstream (~> 0.8), unless there is a specific reason that it needs to be so "strict". In my personal experience with pg gem, I never had issues when using recent versions with code written for old versions (but those were simple use cases). However, it seems that the redmine port is already designed to handle this, when POSTGRESQL option is used, it will copy www/redmine/files/pg.rb file to a directory where all files are loaded by the "main" gem dependencies file (patch in www/redmine/files/patch-Gemfile). patch-Gemfile adds this code: Dir["#{File.dirname(__FILE__)}/bundler.d/*.rb"].each do |bundle| self.instance_eval(Bundler.read_file(bundle)) end And pg.rb includes this: gem "pg", ">= 0.18.1" I don't use this port and have not checked this particular issue, but it seems the port already have a proper solution. If it does not work properly I could look into it if needed, let me know. -- Thibault Jouan