I Just upgraded old rails app (3.2.22) to rails 4.2.10 and I am not sure if this is the right place but after a few hours of research, I am a little stumped. BRAND NEW rails 4.2.10 (same ruby) projects work (the behavior below does not happen) but this upgraded project fails on any instance of the ActiveSupport:: Duration
functions. Did I miss something in the upgrade? Is it a gem issue? load order?
its not just Fixnum its any of these ActiveSupport::Duration functions
irb(main):001:0> 20.days
=> 20 days
irb(main):002:0> 20.days.from_now
=> Wed, 13 Jun 2018 22:35:42 UTC +00:00
irb(main):003:0> 20.days
TypeError: ActiveSupport::Duration can't be coerced into Fixnum
from /Users/ttsentsiper/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/activesupport-4.2.10/lib/active_support/core_ext/numeric/time.rb:35:in `*'
from /Users/ttsentsiper/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/activesupport-4.2.10/lib/active_support/core_ext/numeric/time.rb:35:in `days'
from (irb):3
from /Users/ttsentsiper/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/railties-4.2.10/lib/rails/commands/console.rb:110:in `start'
from /Users/ttsentsiper/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/railties-4.2.10/lib/rails/commands/console.rb:9:in `start'
from /Users/ttsentsiper/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/railties-4.2.10/lib/rails/commands/commands_tasks.rb:68:in `console'
from /Users/ttsentsiper/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/railties-4.2.10/lib/rails/commands/commands_tasks.rb:39:in `run_command!'
from /Users/ttsentsiper/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/railties-4.2.10/lib/rails/commands.rb:17:in `<top (required)>'
from bin/rails:4:in `require'
from bin/rails:4:in `<main>'
irb(main):004:0> 20.days.from_now
TypeError: ActiveSupport::Duration can't be coerced into Fixnum
from /Users/ttsentsiper/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/activesupport-4.2.10/lib/active_support/core_ext/numeric/time.rb:35:in `*'
from /Users/ttsentsiper/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/activesupport-4.2.10/lib/active_support/core_ext/numeric/time.rb:35:in `days'
from (irb):4
from /Users/ttsentsiper/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/railties-4.2.10/lib/rails/commands/console.rb:110:in `start'
from /Users/ttsentsiper/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/railties-4.2.10/lib/rails/commands/console.rb:9:in `start'
from /Users/ttsentsiper/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/railties-4.2.10/lib/rails/commands/commands_tasks.rb:68:in `console'
from /Users/ttsentsiper/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/railties-4.2.10/lib/rails/commands/commands_tasks.rb:39:in `run_command!'
from /Users/ttsentsiper/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/railties-4.2.10/lib/rails/commands.rb:17:in `<top (required)>'
from bin/rails:4:in `require'
from bin/rails:4:in `<main>'
Rails version: 4.2.10
Ruby version: ruby 2.3.1p112
I also tried upgrading to ruby 2.4 on the same project and the issue persists (seems not ruby related)
Also copied the gemfile from the project that does not work into a new project and things seem ok