问题描述
SQLite3::SQLException:SQL 逻辑错误或缺少数据库
从浏览器对表执行插入、更新和删除操作时出错(即创建、更新和销毁操作失败,但显示操作正常),控制台中的相同操作是可以的.我google了一下这个问题,发现大部分的解决方法是去掉fixtures中的重复,所以我把fixtures中的所有测试数据都去掉了,重启服务器,又失败了:(
任何建议表示赞赏.
error when do insert, update and delete operation to tables from browser( that means the create, update and destroy action is failed but the show action is fine ), the same operation in console is OK. I googled this problem and found most of the solutions is to remove duplication in the fixtures, so I removed all the test data from the fixture and restart the server, and it failed again:(
Any advise is appreciated.
推荐答案
原来我忘记使用 "sudo script/server"
来获得对数据库的写权限:)
It turned out that I forget use "sudo script/server"
to get write permission to the database :)
这篇关于SQLite3::SQLException 问题:SQL 逻辑错误或数据库丢失的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!