https://www.redmine.org/https://www.redmine.org/favicon.ico?16793021292021-08-29T03:50:14ZRedmineRedmine - Patch #35816: Patch to add Postgis adapter supporthttps://www.redmine.org/issues/35816?journal_id=1039802021-08-29T03:50:14ZMischa The Evil
<ul></ul><p>I'm not sure if this is something Redmine should support OOTB within the core.</p>
<p>What do other people think about this?</p> Redmine - Patch #35816: Patch to add Postgis adapter supporthttps://www.redmine.org/issues/35816?journal_id=1039982021-09-01T20:41:00ZMarcel B
<ul></ul><p>Thanks for the opportunity to discuss this subject!</p>
<p>I think it is not going to break builtin compatibility with <em>pg adapter</em>, as stated in <a class="external" href="https://rubygems.org/gems/activerecord-postgis-adapter">https://rubygems.org/gems/activerecord-postgis-adapter</a> :</p>
<blockquote>
<p>ActiveRecord connection adapter for PostGIS. It is based on the stock PostgreSQL adapter, and adds built-in support for the spatial extensions provided by PostGIS. It uses the RGeo library to represent spatial data in Ruby.</p>
</blockquote>
<p>I read parts of the postgis source code, and it really uses pg adapter to address all non spatial queries.</p>
<p><em>Gemfile</em>:</p>
<pre>
<code class="ruby syntaxhl"><span class="n">source</span> <span class="s2">"https://rubygems.org"</span>
<span class="c1"># Specify your gem's dependencies in activerecord-postgis-adapter.gemspec</span>
<span class="n">gemspec</span>
<span class="n">gem</span> <span class="s2">"pg"</span><span class="p">,</span> <span class="s2">"~> 1.0"</span><span class="p">,</span> <span class="ss">platform: :ruby</span>
<span class="n">gem</span> <span class="s2">"activerecord-jdbcpostgresql-adapter"</span><span class="p">,</span> <span class="ss">platform: :jruby</span>
<span class="n">gem</span> <span class="s2">"ffi-geos"</span><span class="p">,</span> <span class="ss">platform: :jruby</span>
<span class="n">gem</span> <span class="s2">"byebug"</span> <span class="k">if</span> <span class="no">ENV</span><span class="p">[</span><span class="s2">"BYEBUG"</span><span class="p">]</span>
</code><br /></pre>