简体   繁体   中英

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

I am trying the rails tutorial, but the rails server is not working 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>'

On the bundle install, nothing was installed, it seemed to instantly print out the list of things installed. My ruby seems correct:

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

I deleted vendor packages because the last error complained about using sqlite3 with ruby 2.4.0 when my default ruby is 2.4.1 now.

How can I fix this and start rails?

安装Rails 4.2.8 ,它与Ruby v 2.4兼容。*

$ gem install rails -v '4.2.8'

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM