Ruby 2.3.3 + Rails 4.2.6 + Postgis Rgeo not supported?


I’m using this config no CircleCi 2.

- image: circleci/ruby:2.3.3-node-browsers
    RAILS_ENV: test
    PGUSER: app_name
- image: circleci/postgres:10.6-alpine-postgis-ram
    POSTGRES_USER: app_name
    POSTGRES_DB: app_name_test
- image: circleci/node:11.4
- image: redis
- image: elasticsearch:6.5.4

But when my test run, with Rspec, i’m having this error when use geographic thing of Postgis:

undefined method 'property' for nil:NilClass

Some one have passed this problem?? I tried everthing of the internet for days. I was using CI 1 that always worked, but now, is required to use CI 2.

I read somewhere that, need to install geos before bundle gems tha use it. How i apt-get install stuff before this?


Which step do you get the error in? I assume it happens in your primary/build container (Node 11.4), and you will presumably be running your tests in a step (not shown in your YAML). So, if you want to do an apt-get then do that in a run step before your tests.


Found a solution!

A alternative to everyone have a bug like that, because is using polygon:

undefined methodproperty’ for nil:NilClass`

First, do not use st_polygon or st_point to the column. Read the doc for they, and save the column like a string, and then uses ST_GeomFromText(your_shape) to transform it directly.
This only works if Postgis is configured correctly.


Ah, did Postgres require a plugin that is not available in the standard image?