Rails 升级到 4.2 来自 arel 的 Stack too deep 错误

Rails upgrade to 4.2 Stack too deep error from arel

我正在进行 rails 升级并且已经成功升级到 4.1.16

现在要跳转到 4.2... 能够成功 运行 bundle update 但是当我尝试 运行 我的规格时,我得到了少量 SystemStackError 如下:

//home/vagrant/.rvm/gems/ruby-2.2.3/gems/arel-6.0.4/lib/arel/visitors/reduce.rb:14:in `rescue in visit': stack level too deep (SystemStackError)
from /home/vagrant/.rvm/gems/ruby-2.2.3/gems/arel-6.0.4/lib/arel/visitors/reduce.rb:13:in `visit'
from /home/vagrant/.rvm/gems/ruby-2.2.3/gems/arel-6.0.4/lib/arel/visitors/to_sql.rb:241:in `block in visit_Arel_Nodes_SelectCore'
from /home/vagrant/.rvm/gems/ruby-2.2.3/gems/arel-6.0.4/lib/arel/visitors/to_sql.rb:240:in `each'
from /home/vagrant/.rvm/gems/ruby-2.2.3/gems/arel-6.0.4/lib/arel/visitors/to_sql.rb:240:in `each_with_index'
from /home/vagrant/.rvm/gems/ruby-2.2.3/gems/arel-6.0.4/lib/arel/visitors/to_sql.rb:240:in `visit_Arel_Nodes_SelectCore'
from /home/vagrant/.rvm/gems/ruby-2.2.3/gems/arel-6.0.4/lib/arel/visitors/to_sql.rb:210:in `block in visit_Arel_Nodes_SelectStatement'
from /home/vagrant/.rvm/gems/ruby-2.2.3/gems/arel-6.0.4/lib/arel/visitors/to_sql.rb:209:in `each'
from /home/vagrant/.rvm/gems/ruby-2.2.3/gems/arel-6.0.4/lib/arel/visitors/to_sql.rb:209:in `inject'
 ... 9265 levels...
from /home/vagrant/.rvm/gems/ruby-2.2.3/bin/rspec:23:in `load'
from /home/vagrant/.rvm/gems/ruby-2.2.3/bin/rspec:23:in `<main>'
from /home/vagrant/.rvm/gems/ruby-2.2.3/bin/ruby_executable_hooks:15:in `eval'
from /home/vagrant/.rvm/gems/ruby-2.2.3/bin/ruby_executable_hooks:15:in `<main>'

我想弄清楚changed/updated这里需要什么,谢谢。

P.S: Ruby 版本为 2.2.3

#更新: 我在之前的堆栈跟踪中犯了一个错误,是错误的,我现在已经更新了。

#更新(03/16): 这似乎是由设计引起的...... 我设法将错误追溯到 config/initializers/devise.rb 中的以下行:

require 'devise/orm/active_record'

我找到了...

所以,因为我试图避免 this issue which also has a Whosebug post here,所以我的设计版本似乎太高了。

我之前是运行设计的3.2.1,我把它升到3.5.1。如果我一次只更新一个 gem 我会注意到这一点...

但是,版本 3.4.1 现在对我来说非常适用。

我可能还应该提到我的 pg gem 版本是 0.17.0.