2012-07-06 55 views
0

試圖從Hekoku拉數據庫到本地,但失敗。未能從Heroku中拉數據庫

heroku db:pull postgres://root:@localhost/db_name 

無可否認,我不知道該如何構造url。在官方site中是heroku db:push postgres://postgres:[email protected]/mydb,而在this中使用了文章heroku db:pull postgres://root:@localhost/db_name。用戶名和密碼的用途是什麼?

無論如何,我得到了錯誤的信息是:

Sequel::DatabaseConnectionError -> TypeError: wrong argument type Sequel::Postgres::Adapter (expected Struct) 

說完之後更新的說明taps, sequel, and pg,這裏是我的寶石列表:

rest-client (1.6.7) 
sinatra (1.0) 
taps(0.3.24) 
sequel (3.37.0, 3.20.0) 
pg (0.14.0) 
+0

你可以發佈完整的回溯?沒有它就很難診斷問題的原因。 – 2012-07-06 16:10:26

+0

你的應用程序是否使用Activerecord,或者你只是手動拉動它? – 2012-07-06 16:34:35

回答

0

這個問題不再是相關的,現在爲我已經建議here從共享sqlite數據庫切換到9.1開發數據庫。因此,我不會使用簡單的db pull/push,而是使用更實際的pgbackup,這實際上是Heroku推薦的。