简体   繁体   English

部署 JROR 后参数数量错误(给定 0,预期为 1)

[英]wrong number of arguments (given 0, expected 1) after deployment JROR

Ror Experts,专家,

I am having some kind of routing issue (I think so..).我有某种路由问题(我认为是......)。 The Ahoy tracks visits and events in the development environment - running under webbrick server. Ahoy 跟踪开发环境中的访问和事件 - 在 webbrick 服务器下运行。 When the application is deployed using warbler and published to apache tomcat server, it throws 500 error, Wrong number of Arguments (given 0, expected 1) while trying to log events.当应用程序使用 warbler 部署并发布到 apache tomcat 服务器时,它在尝试记录事件时抛出 500 错误,错误数量的参数(给定 0,预期为 1)。 Tracking visits works as expected.跟踪访问按预期工作。

I have already tried suggestions mentioned in ahoy github account ( https://github.com/ankane/ahoy/issues/356 ) without success.我已经尝试过 ahoy github 帐户 ( https://github.com/ankane/ahoy/issues/356 ) 中提到的建议,但没有成功。

I tried to debug if the data from react code is sending data as expected.我试图调试来自反应代码的数据是否按预期发送数据。 It is indeed sending the data.它确实在发送数据。 I tried to post the data using postman directly to the controller using the same load to both development and deployed environment.我尝试使用邮递员将数据直接发布到控制器,使用相同的负载到开发和部署环境。 It works on development but not on deployed.它适用于开发,但不适用于部署。

I also tried to check error logs on the server.我还尝试检查服务器上的错误日志。 There is no information except 500 error.除了500错误没有其他信息。

Can someone help me out...有人可以帮我吗...

PS: PS:

Prod server: Apache Tomcat生产服务器: Apache Tomcat

Environment: Jruby on rails环境: Jruby on rails

Front End: React前端:反应

Found a solution.找到了解决办法。 Fixed using gem as integral part of application instead of gem...... Still doesn't know what caused the issue.修复了使用 gem 作为应用程序的组成部分而不是 gem ......仍然不知道是什么导致了这个问题。 My gut feeling is some kind of routing issue with jruby and bundler warbler.我的直觉是 jruby 和 bundler warbler 的某种路由问题。

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

相关问题 参数数目错误(给定0,应为1) - wrong number of arguments (given 0, expected 1) 参数数目错误(给定0,应为4) - wrong number of arguments (given 0, expected 4) 参数数目错误(给定1,预期为0) - wrong number of arguments (given 1, expected 0) ArgumentError:添加新中间件后 arguments 的数量错误(给定 1,预期为 0) - ArgumentError: wrong number of arguments (given 1, expected 0) after adding a new middleware 升级到 Rails 6 后参数数量错误(给定 4,预期为 0..1) - wrong number of arguments (given 4, expected 0..1) after upgrading to Rails 6 Capistrano 部署引发心理错误:arguments 的编号错误(给定 4,预期为 1):`safe_load' - Capistrano deployment throws psych error: wrong number of arguments (given 4, expected 1) :`safe_load' FactoryGirl ArgumentError:参数数量错误(给定1,预期为0) - FactoryGirl ArgumentError: wrong number of arguments (given 1, expected 0) Rails错误的参数数量(给定0,应为1) - Rails wrong number of arguments (given 0, expected 1) ArgumentError:参数数量错误(给定0,应为1..2) - ArgumentError: wrong number of arguments (given 0, expected 1..2) Resque Worker的参数数量错误(给定1,预期为2) - wrong number of arguments (given 1, expected 2) with Resque Worker
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM