"rake routes" causes syntax error: time_zone.rb circular argument reference - now

Viewed 222

I am trying to run rake routes, but I am getting this error (see full stack trace below):

rake aborted!
SyntaxError: /usr/local/lib/ruby/gems/2.7.0/gems/activesupport-3.2.12/lib/active_support/values/time_zone.rb:270: circular argument reference - now

How can I resolve this?

Attempts to resolve the problem

I tried bundle install and bundle update, which both ran successfully. However, this did not resolve the circular argument error resulting from rake routes.

More Info

Bundler version: 1.10.6

Ruby version: 2.7.1p83

Rake version: 13.0.1

Rails version: 3.2.12

SyntaxError: /usr/local/lib/ruby/gems/2.7.0/gems/activesupport-3.2.12/lib/active_support/values/time_zone.rb:270: circular argument reference - now
/usr/local/lib/ruby/gems/2.7.0/gems/activesupport-3.2.12/lib/active_support/time_with_zone.rb:1:in `require'
/usr/local/lib/ruby/gems/2.7.0/gems/activesupport-3.2.12/lib/active_support/time_with_zone.rb:1:in `<top (required)>'
/usr/local/lib/ruby/gems/2.7.0/gems/activesupport-3.2.12/lib/active_support/core_ext/time/zones.rb:1:in `require'
/usr/local/lib/ruby/gems/2.7.0/gems/activesupport-3.2.12/lib/active_support/core_ext/time/zones.rb:1:in `<top (required)>'
/usr/local/lib/ruby/gems/2.7.0/gems/activesupport-3.2.12/lib/active_support/core_ext/date/zones.rb:2:in `require'
/usr/local/lib/ruby/gems/2.7.0/gems/activesupport-3.2.12/lib/active_support/core_ext/date/zones.rb:2:in `<top (required)>'
/usr/local/lib/ruby/gems/2.7.0/gems/activesupport-3.2.12/lib/active_support/core_ext/date/calculations.rb:4:in `require'
/usr/local/lib/ruby/gems/2.7.0/gems/activesupport-3.2.12/lib/active_support/core_ext/date/calculations.rb:4:in `<top (required)>'
/usr/local/lib/ruby/gems/2.7.0/gems/activesupport-3.2.12/lib/active_support/ruby/shim.rb:12:in `require'
/usr/local/lib/ruby/gems/2.7.0/gems/activesupport-3.2.12/lib/active_support/ruby/shim.rb:12:in `<top (required)>'
/usr/local/lib/ruby/gems/2.7.0/gems/actionpack-3.2.12/lib/abstract_controller.rb:6:in `require'
/usr/local/lib/ruby/gems/2.7.0/gems/actionpack-3.2.12/lib/abstract_controller.rb:6:in `<top (required)>'
/usr/local/lib/ruby/gems/2.7.0/gems/actionpack-3.2.12/lib/action_controller.rb:1:in `require'
/usr/local/lib/ruby/gems/2.7.0/gems/actionpack-3.2.12/lib/action_controller.rb:1:in `<top (required)>'
/usr/local/lib/ruby/gems/2.7.0/gems/actionpack-3.2.12/lib/action_controller/railtie.rb:2:in `require'
/usr/local/lib/ruby/gems/2.7.0/gems/actionpack-3.2.12/lib/action_controller/railtie.rb:2:in `<top (required)>'
/usr/local/lib/ruby/gems/2.7.0/gems/activerecord-3.2.12/lib/active_record/railtie.rb:9:in `require'
/usr/local/lib/ruby/gems/2.7.0/gems/activerecord-3.2.12/lib/active_record/railtie.rb:9:in `<top (required)>'
/usr/local/lib/ruby/gems/2.7.0/gems/railties-3.2.12/lib/rails/all.rb:12:in `require'
/usr/local/lib/ruby/gems/2.7.0/gems/railties-3.2.12/lib/rails/all.rb:12:in `block in <top (required)>'
/usr/local/lib/ruby/gems/2.7.0/gems/railties-3.2.12/lib/rails/all.rb:10:in `each'
/usr/local/lib/ruby/gems/2.7.0/gems/railties-3.2.12/lib/rails/all.rb:10:in `<top (required)>'

My Gemfile:

source 'https://rubygems.org'

gem 'rails', '3.2.12'
gem 'mysql2', '0.5.3'
gem 'rubycas-client'
gem 'exception_notification'
gem 'jquery-rails'
gem 'json', '>=1.8.3'
gem 'test-unit'
1 Answers

According to the release notes, Rails 3.2 only supports Ruby 1.8.7 and Ruby 1.9.2. You are using Ruby 2.7.1.

Please note that Ruby on Rails 3.2 is no longer supported by the community since 2016, and Ruby 1.8.7 and 1.9.2 are no longer supported by the community since 2014.

There is a company that sells Long-Term Support for Ruby on Rails: https://railslts.com/. You can buy a support plan for Ruby on Rails 3.2 for only 150$/month, and their version also supports Ruby 2.5. Ruby 2.5 is no longer actively developed by the community, but it still receives critical security fixes by the community until 2021-03-31.

Related