Ruby 2.4.1 - warning: constant :: Fixnum is deprecated

I am new to StackOverflow and Rails, so I hope this is not too naive a question. I am trying to run my application locally using the bin / rails server. When I print this, I get the following trace:

=> Booting Puma => Rails 4.2.5 application starting in development on http://localhost:3000 => Run `rails server -h` for more startup options => Ctrl-C to shutdown server /Users/name/.rvm/gems/ruby-2.4.1/gems/activesupport-4.2.5/lib/active_support/core_ext/numeric/conversions.rb:121: warning: constant ::Fixnum is deprecated /Users/name/.rvm/gems/ruby-2.4.1/gems/activesupport-4.2.5/lib/active_support/core_ext/numeric/conversions.rb:121: warning: constant ::Bignum is deprecated Exiting /Users/name/.rvm/gems/ruby-2.4.1/gems/activesupport-4.2.5/lib/active_support/core_ext/numeric/conversions.rb:125:in `block (2 levels) in <class:Numeric>': stack level too deep (SystemStackError) from /Users/name/.rvm/gems/ruby-2.4.1/gems/activesupport-4.2.5/lib/active_support/core_ext/numeric/conversions.rb:131:in `block (2 levels) in <class:Numeric>' from /Users/name/.rvm/gems/ruby-2.4.1/gems/activesupport-4.2.5/lib/active_support/core_ext/numeric/conversions.rb:131:in `block (2 levels) in <class:Numeric>' from /Users/name/.rvm/gems/ruby-2.4.1/gems/activesupport-4.2.5/lib/active_support/core_ext/numeric/conversions.rb:131:in `block (2 levels) in <class:Numeric>' from /Users/name/.rvm/gems/ruby-2.4.1/gems/activesupport-4.2.5/lib/active_support/core_ext/numeric/conversions.rb:131:in `block (2 levels) in <class:Numeric>' from /Users/name/.rvm/gems/ruby-2.4.1/gems/activesupport-4.2.5/lib/active_support/core_ext/numeric/conversions.rb:131:in `block (2 levels) in <class:Numeric>' from /Users/name/.rvm/gems/ruby-2.4.1/gems/activesupport-4.2.5/lib/active_support/core_ext/numeric/conversions.rb:131:in `block (2 levels) in <class:Numeric>' from /Users/name/.rvm/gems/ruby-2.4.1/gems/activesupport-4.2.5/lib/active_support/core_ext/numeric/conversions.rb:131:in `block (2 levels) in <class:Numeric>' from /Users/name/.rvm/gems/ruby-2.4.1/gems/activesupport-4.2.5/lib/active_support/core_ext/numeric/conversions.rb:131:in `block (2 levels) in <class:Numeric>' ... 5603 levels... from /Users/name/.rvm/rubies/ruby-2.4.1/lib/ruby/site_ruby/2.4.0/rubygems/core_ext/kernel_require.rb:68:in `require' from /Users/name/spending-tracker-master/bin/spring:13:in `<top (required)>' from bin/rails:3:in `load' from bin/rails:3:in `<main>' 

I do not believe that I can ignore it, as indicated here ( warning: constant :: Fixnum is deprecated when creating a new model ), because it will not open the application locally.

Can anyone help?

Thanks! Ben

+7
ruby ruby-on-rails
source share
1 answer

Ruby 2.4 unified Fixnum and Bignum into one Integer class. When Rails (ActiveSupport core extensions , to be precise) tries to defuse the above classes, an error occurs.

This was fixed in Rails 5, and the fix was also sent back to Rails 4.2 with version 4.2.8 :

Hello to all,

I am pleased to announce the release of Rails 4.2.8.

This is the first version of the 4.2 series that officially supports Ruby 2.4.

All you have to do is upgrade Rails from 4.2.5 to Rails 4.2.8.

+8
source share

All Articles