redmine + postgresql
Thibault Jouan
tj+freebsd_ruby at a13.fr
Mon Dec 25 05:35:03 UTC 2017
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
More information about the freebsd-ruby
mailing list