Rails multi_db with transaction

后端 未结 1 1252
我在风中等你
我在风中等你 2021-01-16 15:02

I\'ve recently installed the multi_db gem on my rails 2.3.10 app in order to use a MySql master/slave replication.

since installing the gem, every time I use transac

相关标签:
1条回答
  • 2021-01-16 15:25

    multi_db is not entirely compatible with ActiveRecord 2.3.10. It's calling the transaction method on the connection with different arguments than are acceptable (see the call site here).

    You'll have to either not use transactions, downgrade Rails, fix multi_db (please do!), or just remove that gem entirely.

    You can see here where the parameters to transaction changed in ActiveRecord::ConnectionAdapters::DatabaseStatements, back in January 2009 (before Rails 2.3.0 was released).

    0 讨论(0)
提交回复
热议问题