Just trying to set up rails app on ubuntu to do some low level dev work without going through the hassle of bothering our main devs. However at the very end of the process, I run rails s command. I get landing page on localhost:3000 and can get through the pages without direct call to database. However when I go to any page that gets the data from db, it gives me following error:
ActiveRecord::StatementInvalid in WantsController#new
PG::Error: ERROR: relation "geometry_columns" does not exist
LINE 1: SELECT * FROM geometry_columns WHERE f_table_name='wants'
^
: SELECT * FROM geometry_columns WHERE f_table_name='wants'
Now, no idea what I'm doing wrong. Here are the steps I'm taking:
sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt/ precise-pgdg main" >> /etc/apt/sources.list'
wget --quiet -O - http://apt.postgresql.org/pub/repos/apt/ACCC4CF8.asc | sudo apt-key add -
sudo apt-get update
sudo apt-get install postgresql-9.3-postgis pgadmin3 postgresql-contrib postgresql-server-dev-9.3
sudo -u postgres psql
postgres=# CREATE EXTENSION adminpack;
postgres=# CREATE EXTENSION postgis;
postgres=# \q
postgres=# CREATE USER abc WITH PASSWORD 'abc';
postgres=# CREATE DATABASE abc;
postgres=# CREATE DATABASE abc_development;
pg_restore --verbose --clean --no-acl --no-owner -h localhost -U abc -d abc abc-20131217-09.pgdmp
pg_restore --verbose --clean --no-acl --no-owner -h localhost -U abc -d abc_development abc_development-20131217-09.pgdmp
Then navigate to cloned git folder and execute bundle and rails s
Here's the database.yml:
development: &dev
# adapter: postgresql
database: abc_development
username: abc
password: abc
host: localhost
encoding: utf8
postgis_extension: true
schema_search_path: public,postgis
adapter: postgis
encoding: utf8
postgis_extension: postgis
production:
adapter: postgis
database: abc
username: abc
password: oTSZ1gQdwsFXWIUZsehj
host: localhost
encoding: utf8
postgis_extension: true
schema_search_path: public,postgis
postgis_extension: postgis
Any ideas where it is going wrong? Help would be much appreciated.