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文件 –