0

Upon running rake db:test:prepare my test database was dropped, but failed to be rebuilt. After researching the errors, I simply attempted to load the database with rake db:test:load to repopulate based on the schema.rb file. That call resulted in the following message

PG::Error: ERROR: could not open extension control file "/usr/pgsql-9.1/share/extension/postgis.control": No such file or directory

I've spent the day reinstalling postgresql-9.1 and postGIS 1.5.3 on a test server in every way I can find on the internet, and none of those installations produce the ever-elusive postgis.control file. Is there a special install I need to run on a CentOS6 machine to produce the binary? Or is there another way to run the rake tasks to test the psql database?

1
  • I wonder if all I need to do is reload the postgis library into the database, but I'm not sure how. Any help? Commented Jan 31, 2013 at 0:59

1 Answer 1

2

This message is shown for CREATE EXTENSION postgis; however the newer extension method was introduced for PostGIS 2.0. The version that you have installed does not support this method.

Either upgrade to PostGIS 2.0 (excellent RPMs for YUM here), or spatially enable a PostGIS 1.5 database using either a template or using enabler scripts. Details here.

Sign up to request clarification or add additional context in comments.

1 Comment

thanks. I had the same problem. Upgrading to PostGIS 2 fixed it, by providing /usr/.../extension/postgis.control. (using Rails 3.2 on openSuSE 12.3).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.