应用程序可以在 Heroku 上运行,但不再在本地运行?

发布于 2024-12-28 13:40:02 字数 788 浏览 2 评论 0原文

好吧,那么, 我一直在 sinatra 开发一个小型网络应用程序。周末休息后,我遇到了一个奇怪的问题,并且无法追踪它。

我的应用程序托管在 Heroku 上,并且在那里运行得很好。但是,现在该应用程序不再在本地运行。即使从 Heroku 克隆源也会产生同样的问题。

== Sinatra/1.3.2 has taken the stage on 4567 for development with backup from Thin
>> Thin web server (v1.3.1 codename Triple Espresso)
>> Maximum connections set to 1024
>> Listening on 0.0.0.0:4567, CTRL+C to stop
!! Unexpected error while processing request: undefined method `<<' for nil:NilClass

我尝试在三台不同的计算机(intel macmini、thunderbolt MacBook pro 和 G4 mini)上再次运行该程序,但均产生相同的错误。

我已经检查了我的代码,寻找任何未封闭或不完整的代码&找不到任何东西。即使使用 git 恢复到已知的工作版本也会产生相同的错误。

任何帮助将不胜感激,因为我对红宝石的了解仍然相当有限。如果有人有兴趣/愿意看一下我的代码,我愿意分享。

唯一可能发生变化的事情是:我更新了我的开发机器上的 gems 已更新。但我不知道这会如何影响其他两台机器的情况。

Ok so,
I have been working on a small webapp in sinatra. After taking the weekend off I am running into a strange problem and having trouble tracking it down.

My app so hosted on Heroku and works just fine there. However, now the app no longer works locally. Even cloning the source back from Heroku produces the same problem.

== Sinatra/1.3.2 has taken the stage on 4567 for development with backup from Thin
>> Thin web server (v1.3.1 codename Triple Espresso)
>> Maximum connections set to 1024
>> Listening on 0.0.0.0:4567, CTRL+C to stop
!! Unexpected error while processing request: undefined method `<<' for nil:NilClass

I have tried to get this running again on three different computers (intel macmini, thunderbolt MacBook pro, & G4 mini) all produce the same error.

I have gone over my code looking for any unclosed or incomplete code & cannot find anything. Even reverting to a known working version with git produces the same error.

Any help at all would be greatly appreciated as my knowledge of ruby is still rather limited. If some one is interested/willing to take a look at my code I would be willing to share.

The only thing that may have changed: I updated gems on my development machine have been updated. But I don't see how that could effect the situation on the other two machines.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

叫思念不要吵 2025-01-04 13:40:02

这里讨论了在不同的应用程序上与 Sinatra 发生的相同错误。讨论了修复方法,确定的解决方法是将 Rack 版本从 1.4.0 回滚到 1.3.6。

Here's a discussion of the same error with Sinatra on a different app. A fix was discussed and one identified workaround was to roll back the Rack version from 1.4.0 to 1.3.6.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文