2

在此处输入图像描述

我在调用保存方法时发现了这个错误

我的 Rails Envi:Rails 3.2.5、sqlite 3.7.12(在 GemFile 1.3.6 中)、最新的 ActiveRecord

提前谢谢你。

4

1 回答 1

0

ActiveRecord and newer versions of SQLite both support nested transactions, but the AR/SQLite adapter does not.

Further reading:

https://rails.lighthouseapp.com/projects/8994-ruby-on-rails/tickets/6307 http://stackoverflow.com/questions/4153719/rails-3-nested-transactions-exception-in-a-child-block

A surprising omission from the docs, given that SQLite is the default DB!

于 2012-06-08T18:53:40.967 回答