堆栈级别太深,无法设置Rails

时间:2019-02-13 02:44:56

标签: ruby-on-rails macos terminal rubygems homebrew

我正在macOS Mojave MacBook Air的导轨上设置红宝石。我不明白为什么我会通过安装Rails并尝试Rails服务器命令来得到此错误:

Alexs-Air:test_app alex$ rbenv rehash
Alexs-Air:test_app alex$ rails server
/Users/alex/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/activesupport-4.2.3/lib/active_support/core_ext/object/duplicable.rb:85: warning: BigDecimal.new is deprecated; use BigDecimal() method instead.
=> Booting WEBrick
=> Rails 4.2.3 application starting in development on http://localhost:3000
=> Run `rails server -h` for more startup options
=> Ctrl-C to shutdown server
/Users/alex/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/activesupport-4.2.3/lib/active_support/core_ext/numeric/conversions.rb:121: warning: constant ::Fixnum is deprecated
/Users/alex/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/activesupport-4.2.3/lib/active_support/core_ext/numeric/conversions.rb:121: warning: constant ::Bignum is deprecated
Exiting
Traceback (most recent call last):
    8483: from bin/rails:3:in `<main>'
    8482: from bin/rails:3:in `load'
    8481: from /Users/alex/test_app/bin/spring:15:in `<top (required)>'
    8480: from /Users/alex/.rbenv/versions/2.6.1/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:65:in `require'
    8479: from /Users/alex/.rbenv/versions/2.6.1/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:65:in `require'
    8478: from /Users/alex/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/spring-2.0.2/lib/spring/binstub.rb:31:in `<top (required)>'
    8477: from /Users/alex/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/spring-2.0.2/lib/spring/binstub.rb:31:in `load'
    8476: from /Users/alex/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/spring-2.0.2/bin/spring:49:in `<top (required)>'
     ... 8471 levels...
       4: from /Users/alex/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/activesupport-4.2.3/lib/active_support/core_ext/numeric/conversions.rb:131:in `block (2 levels) in <class:Numeric>'
       3: from /Users/alex/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/activesupport-4.2.3/lib/active_support/core_ext/numeric/conversions.rb:131:in `block (2 levels) in <class:Numeric>'
       2: from /Users/alex/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/activesupport-4.2.3/lib/active_support/core_ext/numeric/conversions.rb:131:in `block (2 levels) in <class:Numeric>'
       1: from /Users/alex/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/activesupport-4.2.3/lib/active_support/core_ext/numeric/conversions.rb:131:in `block (2 levels) in <class:Numeric>'
/Users/alex/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/activesupport-4.2.3/lib/active_support/core_ext/numeric/conversions.rb:131:in `block (2 levels) in <class:Numeric>': stack level too deep (SystemStackError)
Alexs-Air:test_app alex$ gem upgrade rails
ERROR:  While executing gem ... (Gem::CommandLineError)
    Unknown command upgrade
Alexs-Air:test_app alex$ gem upgrade rails
ERROR:  While executing gem ... (Gem::CommandLineError)
    Unknown command upgrade
Alexs-Air:test_app alex$ 

当我尝试使用Rails服务器时出现错误:

(2 levels) in <class:Numeric>': stack level too deep (SystemStackError)

0 个答案:

没有答案