簡體   English   中英

在 <class:Numeric> &#39;:堆棧級別太深(SystemStackError)

[英]in <class:Numeric>': stack level too deep (SystemStackError)

我正在嘗試rails教程,但rails服務器無法運行http://guides.rubyonrails.org/getting_started.html

$ rvm install ruby-2.4.1
$ rvm use 2.4.1 --default
$ gem install bundler
$ bundle install
Using rake 12.0.0
Using i18n 0.8.1
$ rm -rf vendor/
$ bundle install
$ ./bin/rails server
=> Booting WEBrick
=> Rails 4.2.6 application starting in development on http://localhost:3000
=> Run `rails server -h` for more startup options
=> Ctrl-C to shutdown server
/Users/cchilders/tutorials/ruby/rails_official_tutorial/my-code/vendor/bundle/ruby/2.4.0/gems/activesupport-4.2.6/lib/active_support/core_ext/numeric/conversions.rb:121: warning: constant ::Fixnum is deprecated
/Users/cchilders/tutorials/ruby/rails_official_tutorial/my-code/vendor/bundle/ruby/2.4.0/gems/activesupport-4.2.6/lib/active_support/core_ext/numeric/conversions.rb:121: warning: constant ::Bignum is deprecated
Exiting
/Users/cchilders/tutorials/ruby/rails_official_tutorial/my-code/vendor/bundle/ruby/2.4.0/gems/activesupport-4.2.6/lib/active_support/core_ext/numeric/conversions.rb:125:in `block (2 levels) in <class:Numeric>': stack level too deep (SystemStackError)
    from /Users/cchilders/tutorials/ruby/rails_official_tutorial/my-code/vendor/bundle/ruby/2.4.0/gems/activesupport-4.2.6/lib/active_support/core_ext/numeric/conversions.rb:131:in `block (2 levels) in <class:Numeric>'
    from /Users/cchilders/tutorials/ruby/rails_official_tutorial/my-code/vendor/bundle/ruby/2.4.0/gems/activesupport-4.2.6/lib/active_support/core_ext/numeric/conversions.rb:131:in `block (2 levels) in <class:Numeric>'
    from /Users/cchilders/tutorials/ruby/rails_official_tutorial/my-code/vendor/bundle/ruby/2.4.0/gems/activesupport-4.2.6/lib/active_support/core_ext/numeric/conversions.rb:131:in `block (2 levels) in <class:Numeric>'
    from /Users/cchilders/tutorials/ruby/rails_official_tutorial/my-code/vendor/bundle/ruby/2.4.0/gems/activesupport-4.2.6/lib/active_support/core_ext/numeric/conversions.rb:131:in `block (2 levels) in <class:Numeric>'
    from /Users/cchilders/tutorials/ruby/rails_official_tutorial/my-code/vendor/bundle/ruby/2.4.0/gems/activesupport-4.2.6/lib/active_support/core_ext/numeric/conversions.rb:131:in `block (2 levels) in <class:Numeric>'
    from /Users/cchilders/tutorials/ruby/rails_official_tutorial/my-code/vendor/bundle/ruby/2.4.0/gems/activesupport-4.2.6/lib/active_support/core_ext/numeric/conversions.rb:131:in `block (2 levels) in <class:Numeric>'
    from /Users/cchilders/tutorials/ruby/rails_official_tutorial/my-code/vendor/bundle/ruby/2.4.0/gems/activesupport-4.2.6/lib/active_support/core_ext/numeric/conversions.rb:131:in `block (2 levels) in <class:Numeric>'
    from /Users/cchilders/tutorials/ruby/rails_official_tutorial/my-code/vendor/bundle/ruby/2.4.0/gems/activesupport-4.2.6/lib/active_support/core_ext/numeric/conversions.rb:131:in `block (2 levels) in <class:Numeric>'
     ... 5591 levels...
    from /Users/cchilders/tutorials/ruby/rails_official_tutorial/my-code/vendor/bundle/ruby/2.4.0/gems/railties-4.2.6/lib/rails/commands/commands_tasks.rb:39:in `run_command!'
    from /Users/cchilders/tutorials/ruby/rails_official_tutorial/my-code/vendor/bundle/ruby/2.4.0/gems/railties-4.2.6/lib/rails/commands.rb:17:in `<top (required)>'
    from ./bin/rails:4:in `require'
    from ./bin/rails:4:in `<main>'

在捆綁安裝上,沒有安裝任何東西,它似乎立即打印出已安裝的東西列表。 我的紅寶石似乎是正確的:

$ which ruby
/Users/cchilders/.rvm/rubies/ruby-2.4.1/bin/ruby

我刪除了供應商包,因為最后一個錯誤抱怨當我的默認ruby是2.4.1時使用sqlite3和ruby 2.4.0。

我該如何解決這個問題並啟動rails?

安裝Rails 4.2.8 ,它與Ruby v 2.4兼容。*

$ gem install rails -v '4.2.8'

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM