简体   繁体   English

机架应用错误:#

[英]Rack app error: #<ArgumentError: wrong number of arguments (given 2, expected 0)

I am trying to run a Rails app on Windows 10 with the Cmder CLI. 我正在尝试使用Cmder CLI在Windows 10上运行Rails应用程序。 I encountered an error upon startup of the rails server. 启动Rails服务器时遇到错误。

C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/activesupport-5.0.0/lib/active_support/xml_mini.rb:51: warning: constant ::Fixnum is deprecated
C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/activesupport-5.0.0/lib/active_support/xml_mini.rb:52: warning: constant ::Bignum is deprecated
=> Booting Puma
=> Rails 5.0.0 application starting in development on http://localhost:3000
=> Run `rails server -h` for more startup options
C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/activesupport-5.0.0/lib/active_support/core_ext/numeric/conversions.rb:138: warning: constant ::Fixnum is deprecated
*SIGUSR2 not implemented, signal based restart unavailable!
*SIGUSR1 not implemented, signal based restart unavailable!
*SIGHUP not implemented, signal based logs reopening unavailable!
Puma starting in single mode...
* Version 3.4.0 (ruby 2.5.1-p57), codename: Owl Bowl Brawl
* Min threads: 5, max threads: 5
* Environment: development
* Listening on tcp://localhost:3000
Use Ctrl-C to stop 2018-04-27 23:07:32 -0400: Rack app error: ArgumentError: wrong number of arguments (given 2, expected 0)>

Please assist me. 请帮我。

I found the solution to my own problem. 我找到了解决自己问题的方法。 My Ruby version was 2.5.1 and that is not a stable version yet, per my understanding. 根据我的理解,我的Ruby版本是2.5.1,但这还不是一个稳定的版本。

I simply downgraded the Ruby version by installing Rubyinstaller again. 我只是通过再次安装Rubyinstaller降级了Ruby版本。 The version is now 2.3.3 and the apps run fine. 现在的版本是2.3.3,并且应用程序运行良好。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 FactoryGirl ArgumentError:参数数量错误(给定1,预期为0) - FactoryGirl ArgumentError: wrong number of arguments (given 1, expected 0) ArgumentError:参数数量错误(给定0,应为1..2) - ArgumentError: wrong number of arguments (given 0, expected 1..2) ArgumentError(参数数量错误(给定 1,预期为 2)) - ArgumentError (wrong number of arguments (given 1, expected 2)) Rails 中的 ArgumentError(arguments 的编号错误(给定 5,预期为 1)) - ArgumentError (wrong number of arguments (given 5, expected 1)) in Rails Rails-ArgumentError(参数数量错误(给定1,预期为0)): - Rails - ArgumentError (wrong number of arguments (given 1, expected 0)): Rails-ArgumentError给定的参数个数错误3,预期为2 - Rails - ArgumentError wrong number of arguments given 3, expected 2 ArgumentError(arguments 的编号错误(给定 2,预期 0..1) - ArgumentError (wrong number of arguments (given 2, expected 0..1) ArgumentError错误的参数数量(给定0,应为1)-Scss文件 - ArgumentError wrong number of arguments (given 0, expected 1) - Scss files UsersController#中的ArgumentError创建错误的参数数量(给定0,应为1) - ArgumentError in UsersController#create wrong number of arguments (given 0, expected 1) Rails 中止了! ArgumentError:参数数量错误(给定 0,预期为 1..2) - Rails aborted! ArgumentError: wrong number of arguments (given 0, expected 1..2)
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM