I got this error in every part of my rails app. The solution recommended in this question is good when the data is not important to lose.But my problem is I need the data and I don't know how to fix this error.please help.
Asked
Active
Viewed 178 times
0
-
My development.sqlite3 is malformed and I can not repair it . – Afsanefda Sep 03 '17 at 07:09
1 Answers
0
It seems that your sqlite file is broken.
Try it:
sqlite3 prodcution.db "PRAGMA integrity_check;"
Pragma statements supported by SQLite
Once you backup and rebuild db, it may work.
sqlite3 prodcution.db ".dump" | sqlite3 prodcution.db.new

rochefort
- 136
- 6
-
my db is development.sqlit3 is integrity check possible for this db ? – Afsanefda Sep 03 '17 at 06:24
-
-
I followed this: http://froebe.net/blog/2015/05/27/error-sqlite-database-is-malformed-solved/ to recover the missed data but I couldn't instead I used development log to track the lost data. – Afsanefda Sep 05 '17 at 10:40
-
-
I did but still I lost some data in the dump file. I used the log file to find the missed data. – Afsanefda Sep 06 '17 at 10:44