При запуске rake db: перенос с использованием postgres я получаю следующую ошибку:
rake aborted!
ActiveRecord::StatementInvalid: PG::InvalidSchemaName: ERROR: no
schema has been selected to create in
LINE 1: CREATE TABLE "schema_migrations" ("version" character
varyin...
^
: CREATE TABLE "schema_migrations" ("version" character varying NOT
NULL)
/home/garrett/.rvm/gems/ruby-2.5.0/gems/activerecord-4.2.8/lib/active_record/connection_adapters/postgresql/database_statements.rb:155:in `async_exec'
/home/garrett/.rvm/gems/ruby-2.5.0/gems/activerecord-4.2.8/lib/active_record/connection_adapters/postgresql/database_statements.rb:155:in `block in execute'
/home/garrett/.rvm/gems/ruby-2.5.0/gems/activerecord-4.2.8/lib/active_record/connection_adapters/abstract_adapter.rb:484:in `block in log'
/home/garrett/.rvm/gems/ruby-2.5.0/gems/activesupport-4.2.8/lib/active_support/notifications/instrumenter.rb:20:in `instrument'
/home/garrett/.rvm/gems/ruby-2.5.0/gems/activerecord-4.2.8/lib/active_record/connection_adapters/abstract_adapter.rb:478:in `log'
/home/garrett/.rvm/gems/ruby-2.5.0/gems/activerecord-4.2.8/lib/active_record/connection_adapters/postgresql/database_statements.rb:154:in `execute'
/home/garrett/.rvm/gems/ruby-2.5.0/gems/activerecord-4.2.8/lib/active_record/connection_adapters/abstract/schema_statements.rb:222:in `create_table'
/home/garrett/.rvm/gems/ruby-2.5.0/gems/activerecord-4.2.8/lib/active_record/schema_migration.rb:29:in `create_table'
/home/garrett/.rvm/gems/ruby-2.5.0/gems/activerecord-4.2.8/lib/active_record/connection_adapters/abstract/schema_statements.rb:836:in `initialize_schema_migrations_table'
/home/garrett/.rvm/gems/ruby-2.5.0/gems/activerecord-4.2.8/lib/active_record/migration.rb:925:in `initialize'
/home/garrett/.rvm/gems/ruby-2.5.0/gems/activerecord-4.2.8/lib/active_record/migration.rb:823:in `new'
/home/garrett/.rvm/gems/ruby-2.5.0/gems/activerecord-4.2.8/lib/active_record/migration.rb:823:in `up'
/home/garrett/.rvm/gems/ruby-2.5.0/gems/activerecord-4.2.8/lib/active_record/migration.rb:801:in `migrate'
/home/garrett/.rvm/gems/ruby-2.5.0/gems/activerecord-4.2.8/lib/active_record/tasks/database_tasks.rb:137:in `migrate'
/home/garrett/.rvm/gems/ruby-2.5.0/gems/activerecord-4.2.8/lib/active_record/railties/databases.rake:44:in `block (2 levels) in <top (required)>'
/home/garrett/.rvm/gems/ruby-2.5.0@global/gems/rake-12.3.0/exe/rake:27:in `<top (required)>'
/home/garrett/.rvm/gems/ruby-2.5.0/bin/ruby_executable_hooks:15:in `eval'
/home/garrett/.rvm/gems/ruby-2.5.0/bin/ruby_executable_hooks:15:in `<main>'
Я уже пытался разрешить использование публичной схемы, но все еще сталкиваюсь с ошибкой.Я использовал следующее:
ALTER SCHEMA public OWNER to postgres;
grant usage on schema public to public;
grant create on schema public to public;