2010-08-11 43 views
0

後,我在我的筆記本電腦創建了一個小型的SQLite數據庫,它有幾個記錄:「0表中,0記錄」推非空的SQLite數據庫的Heroku

sqlite> .dump 
PRAGMA foreign_keys=OFF; 
BEGIN TRANSACTION; 
CREATE TABLE "bus_bingo_tile_templates" ("id" INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, "title" VARCHAR(50), "alt" VARCHAR(50), "image_filename" VARCHAR(50), "enabled" BOOLEAN); 
INSERT INTO "bus_bingo_tile_templates" VALUES(26,'bed','I took a nap.','nap.gif',1); 
INSERT INTO "bus_bingo_tile_templates" VALUES(27,'bicyle','Saw someone put a bike on the bus..','bike.gif',1); 
INSERT INTO "bus_bingo_tile_templates" VALUES(28,'books','I read a book.','book.gif',1); 
... 

但是,當我試圖把它上傳到Heroku的,結果是「0表中,0記錄」:

提交StackOverflow.com
$ heroku db:push sqlite:busbingo.db 
Loaded Taps v0.3.11 
Warning: Data in the app 'busbingo' will be overwritten and will not be recoverable. 
Are you sure you wish to continue? (y/n)? y 
Sending schema 
Schema: 100% |==================================================================================| Time: 00:00:00 
Sending data 
0 tables, 0 records 
Resetting sequences 

有人說他通過將其轉換爲schema.rb文件上傳SQLite數據庫到Heroku的成功,但我不不知道怎麼做(我只有Sinatra和DataMapper的經驗)。

回答

0

讓我們從一些理智檢查開始。你能打印Heroku收到的「模式」變量的實際值嗎?

+0

謝謝。在下面看到我自己的答案。 – 2010-08-13 05:12:24

0

我的不好:我在推錯refspec。 Heroku的正確refspec(至少對我來說)是+ HEAD:refs/heads/master。

+0

沒問題。我不知道你找到了什麼,但我很高興你做到了。 – MPelletier 2010-08-13 13:12:42

相關問題