【发布时间】:2017-11-12 13:06:53
【问题描述】:
我是 StackOverflow 和 Rails 的新手,所以我希望这不是一个太幼稚的问题。我正在尝试使用 bin/rails 服务器在本地运行我的应用程序。当我输入它时,我会收到以下跟踪:
=> 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>'
我不相信我可以按照此处 (warning: constant ::Fixnum is deprecated When generating new model) 的说明忽略它,因为它不会在本地打开应用程序。
有人可以帮忙吗?
谢谢! 本
【问题讨论】:
-
尝试更新 rails
-
或者如果你能提供一个minimal reproducible example,我会给你一个更明确的答案。
-
请注意在 Ruby V2.4 中引入的更改 here。
-
您有两个选择:将 Ruby 降级到 2.3.x 或将 Rails 升级到 5.1.x。但是旧版本的 Rails 与最新版本的 Ruby 不兼容。
标签: ruby-on-rails ruby