Ruby 2.4中发生独角兽类型错误时该怎么办



i从2.1升级到2.4(Ruby24,Ruby24-Devel),Bundler(版本:1.17.3),Nokogiri(版本:1.6.8),Rails(版本:版本:4.0)。1),独角兽(版本:5.0.1),Therubyracer(版本:0.12.3)。有以下失败:

> INFO -- : Refreshing Gem list
> /usr/local/share/ruby/gems/2.4/gems/activesupport-4.0.1/lib/active_support/values/time_zone.rb:282:
> warning: circular argument reference - now
> /usr/local/share/ruby/gems/2.4/gems/rbhive-0.5.1/lib/rbhive/t_c_l_i_schema_definition.rb:10:
> warning: key :bigint is duplicated and overwritten on line 14
> /usr/local/share/ruby/gems/2.4/gems/activesupport-4.0.1/lib/active_support/core_ext/numeric/time.rb:50:in
> `*': ActiveSupport::Duration can't be coerced into Integer (TypeError)
>         from /usr/local/share/ruby/gems/2.4/gems/activesupport-4.0.1/lib/active_support/core_ext/numeric/time.rb:50:in
> `days'
>         from /usr/local/share/ruby/gems/2.4/gems/activesupport-4.0.1/lib/active_support/core_ext/numeric/time.rb:55:in
> `weeks'
>         from /usr/local/share/ruby/gems/2.4/gems/devise-3.2.2/lib/devise.rb:131:in
> `<module:Devise>'
>         from /usr/local/share/ruby/gems/2.4/gems/devise-3.2.2/lib/devise.rb:8:in
> `<top (required)>'
>         from /usr/local/share/ruby/gems/2.4/gems/bundler-1.17.3/lib/bundler/runtime.rb:81:in
> `require'
>         from /usr/local/share/ruby/gems/2.4/gems/bundler-1.17.3/lib/bundler/runtime.rb:81:in
> `block (2 levels) in require'
>         from /usr/local/share/ruby/gems/2.4/gems/bundler-1.17.3/lib/bundler/runtime.rb:76:in
> `each'

我想知道是否有人知道该怎么办

这来自rails使用的activesupport GEM。因此,您的railsruby版本之间存在版本兼容性问题。如果要升级ruby,有时您应该相应地升级rails版本。因此,有两种解决这个问题的方法。逐步降低Ruby版本或升级Rails版本。

相关内容

  • 没有找到相关文章

最新更新