项目创建后Rails服务器启动错误

时间:2018-01-31 00:42:28

标签: ruby-on-rails ruby

我正在尝试学习Ruby on rails并创建一个新项目,当我尝试启动服务器机智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
/home/andrei/.rvm/gems/ruby-2.5.0/gems/activesupport-4.2.6/lib/active_support/core_ext/numeric/conversions.rb:121: warning: constant ::Fixnum is deprecated
/home/andrei/.rvm/gems/ruby-2.5.0/gems/activesupport-4.2.6/lib/active_support/core_ext/numeric/conversions.rb:121: warning: constant ::Bignum is deprecated
Exiting
Traceback (most recent call last):
    4222: from bin/rails:3:in `<main>'
    4221: from bin/rails:3:in `load'
    4220: from /home/andrei/Projects/Ruby/blog/bin/spring:15:in `<top (required)>'
    4219: from /home/andrei/Projects/Ruby/blog/bin/spring:15:in `require'
    4218: from /home/andrei/.rvm/gems/ruby-2.5.0/gems/spring-2.0.2/lib/spring/binstub.rb:31:in `<top (required)>'
    4217: from /home/andrei/.rvm/gems/ruby-2.5.0/gems/spring-2.0.2/lib/spring/binstub.rb:31:in `load'
    4216: from /home/andrei/.rvm/gems/ruby-2.5.0/gems/spring-2.0.2/bin/spring:49:in `<top (required)>'
    4215: from /home/andrei/.rvm/gems/ruby-2.5.0/gems/spring-2.0.2/lib/spring/client.rb:30:in `run'
     ... 4210 levels...
       4: from /home/andrei/.rvm/gems/ruby-2.5.0/gems/activesupport-4.2.6/lib/active_support/core_ext/numeric/conversions.rb:131:in `block (2 levels) in <class:Numeric>'
       3: from /home/andrei/.rvm/gems/ruby-2.5.0/gems/activesupport-4.2.6/lib/active_support/core_ext/numeric/conversions.rb:131:in `block (2 levels) in <class:Numeric>'
       2: from /home/andrei/.rvm/gems/ruby-2.5.0/gems/activesupport-4.2.6/lib/active_support/core_ext/numeric/conversions.rb:131:in `block (2 levels) in <class:Numeric>'
       1: from /home/andrei/.rvm/gems/ruby-2.5.0/gems/activesupport-4.2.6/lib/active_support/core_ext/numeric/conversions.rb:131:in `block (2 levels) in <class:Numeric>'
/home/andrei/.rvm/gems/ruby-2.5.0/gems/activesupport-4.2.6/lib/active_support/core_ext/numeric/conversions.rb:131:in `block (2 levels) in <class:Numeric>': stack level too deep (SystemStackError)

1 个答案:

答案 0 :(得分:1)

您需要将Rails更新为更新版本。我相信5.1.4是最新的。我知道Rails 4.2和2.4以上的任何Ruby版本存在很多兼容性问题,如this问题和许多其他在线查询所示。

尝试在Rails应用程序中运行bundle install