When I run rake db:migrate
I get the following error:
ActiveRecord::StatementInvalid: PG::InvalidSchemaName: ERROR: no schema has been selected to create in
: CREATE TABLE "schema_migrations" ("version" character varying NOT NULL)
PG::InvalidSchemaName: ERROR: no schema has been selected to create in
Tasks: TOP => db:migrate
(See full trace by running
ActiveRecord::StatementInvalid: PG::InvalidSchemaName: ERROR: no schema has been selected to create in
: CREATE TABLE "schema_migrations" ("version" character varying NOT NULL)
PG::InvalidSchemaName: ERROR: no schema has been selected to create in
Tasks: TOP => db:migrate
(See full trace by running task with --trace) task with --trace)
I have no idea how to fix it and would welcome any ideas.
I am running rails 4.
This error came about because I was originally using a MySQL database (worked fine), but then switched to pgSQL to allow for easy uploading to heroku. and now it's neither working on the local host nor on heroku.