34
20

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Rubyを2.4に上げたら4.2系列のRailsが stack level too deep で死ぬ時の対処法

Posted at

Ruby2.4 が出たので軽率にアップデートするとこんなエラーが出ました。

.sh
/Users/ironsand/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/activesupport-4.2.7.1/lib/active_support/core_ext/numeric/conversions.rb:121: warning: constant ::Fixnum is deprecated
/Users/ironsand/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/activesupport-4.2.7.1/lib/active_support/core_ext/numeric/conversions.rb:121: warning: constant ::Bignum is deprecated
/Users/ironsand/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/business_time-0.7.6/lib/business_time/core_ext/fixnum.rb:6: warning: constant ::Fixnum is deprecated
/Users/ironsand/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/activesupport-4.2.7.1/lib/active_support/core_ext/numeric/conversions.rb:124:in `block (2 levels) in <class:Numeric>': stack level too deep (SystemStackError)

いくつかの警告とstack level too deepエラーがactive_supportnumericで出てますね。

対策

Railsの4.2系の最新の4.2.7.1でもまだ対応できてないようなので、githubから最新の安定版ブランチをとってきましょう。

Gemfile
gem 'rails', github: 'rails/rails', branch: '4-2-stable'

参考

34
20
1

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
34
20

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?