我敏捷Web開發使用Rails(第4版)第7章,當我運行rake測試:單元,我得到以下錯誤:爲什麼PostgreSQL告訴我一個模式不存在?
rake aborted!
PG::Error: ERROR: invalid value for parameter "search_path": "public"
DETAIL: schema "public" does not exist
: SET search_path TO public
Tasks: TOP => db:test:load => db:test:purge
(See full trace by running task with --trace)
我在MacBook Pro上使用OSX 10.7。 4。我有Ruby 1.9.3,Rails 3.1.0,Rake 0.9.2.2和PostgreSQL 9.1。我的生產,開發和測試數據庫都存在,已經遷移到並匹配我的config/database.yml文件中的名稱,用戶和密碼。所有這些模式都是公開的。
任何人都可以幫助我嗎?
您用來連接到postgres的用戶是否有權限訪問該架構? 嘗試連接命令行 – Strae