0
在我database.yml
耙分贝:迁移无效的架构错误拥有该模式
default: &default
adapter: postgresql
encoding: unicode
pool: 5
timeout: 5000
database: postgres
username: website
development:
<<: *default
host: localhost
password: password
schema_search_path: "website_dev"
Postgres数据库的管理员用户我跑
ubuntu=# CREATE USER website WITH PASSWORD 'password';
CREATE ROLE
ubuntu=# CREATE SCHEMA website_dev AUTHORIZATION website;
CREATE SCHEMA
ubuntu=# CREATE SCHEMA website_test AUTHORIZATION website;
CREATE SCHEMA
作用,这应该意味着用户/角色网站可以在模式website_dev和website_test中创建表,但是rake db:migrate任务失败并显示错误
ActiveRecord::StatementInvalid: PG::InvalidSchemaName: ERROR: no schema has been selected to create in
: CREATE TABLE "schema_migrations" ("version" character varying PRIMARY KEY)
嗨你找到答案了吗?我得到了同样的错误 – BKSpurgeon
是的,我在cloud9.io中遇到了这个问题,因为他们有一组不同的postgres默认值。我已经更新了我的数据库yml,以指向正确的数据库和用户。该临时空间现在已被删除,因此我不能共享〜/ .profile文件 –