Rails/ActiveRecord/SQLite3: Can't save records in test environment

时间秒杀一切 提交于 2019-12-13 07:25:59

问题


I have a Rails app using sqlite3. Anytime I want to save anything in test environment I'm getting the following error:

    ActiveRecord::StatementInvalid:
    SQLite3::SQLException: near "SAVEPOINT": syntax error: SAVEPOINT active_record_1

In development, everything works fine. I'm using Rails 3.2.7.


回答1:


You should upgrade your OS default version of Sqlite

http://shynnergy.com/2012/07/savepoint-exception-with-rails-3-1-on-jenkins/



来源:https://stackoverflow.com/questions/12017182/rails-activerecord-sqlite3-cant-save-records-in-test-environment

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!