gpt4 book ai didi

ruby-on-rails - "rake routes"导致语法错误 : time_zone. rb 循环参数引用 - 现在

转载 作者:行者123 更新时间:2023-12-04 09:02:35 25 4
gpt4 key购买 nike

我正在尝试运行 rake routes ,但我收到此错误(请参阅下面的完整堆栈跟踪):

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
我该如何解决这个问题?
解决问题的尝试
我试过 bundle installbundle update ,两者都运行成功。但是,这并没有解决 rake routes 导致的循环参数错误。 .
更多信息
bundle 版本: 1.10.6 ruby 版本: 2.7.1p83 rake 版: 13.0.1Rails 版本: 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)>'
我的 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'

最佳答案

根据发行说明,Rails 3.2 仅支持 Ruby 1.8.7 和 Ruby 1.9.2。您使用的是 Ruby 2.7.1。
请注意,Ruby on Rails 3.2 自 2016 年起不再受社区支持,自 2014 年起,社区不再支持 Ruby 1.8.7 和 1.9.2。
有一家销售 Ruby on Rails 长期支持的公司:https://railslts.com/ .你可以以每月 150 美元的价格购买 Ruby on Rails 3.2 的支持计划,而且他们的版本也支持 Ruby 2.5。 Ruby 2.5 不再由社区积极开发,但在 2021 年 3 月 31 日之前,它仍会收到社区提供的关键安全修复程序。

关于ruby-on-rails - "rake routes"导致语法错误 : time_zone. rb 循环参数引用 - 现在,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/63532903/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com