在导轨中安装 sinatra 应用程序时出错

发布于 2025-01-07 21:56:51 字数 458 浏览 6 评论 0原文

我有一个 Rails 应用程序,它又在其中使用 sinatra 应用程序。我现在将此行添加到路由中,

mount TestApp::Application => "/test_app"

提供的 /test_app 路由

TypeError (no marshal_dump is defined for class Mutex)

同时访问它在 Ruby 1.9.2 和 Rails 3.2.1 上运行时 。 Sinatra 应用程序使用 mongo gem。

现在,当我针对 ruby​​ 1.8.7 和 Rails 3.2.1 运行此应用程序时,它会给出以下错误

TypeError (can't dump TCPSocket)

非常感谢任何帮助。

I have a rails application that in turn uses sinatra app in it. I added this line to routes

mount TestApp::Application => "/test_app"

now while accessing /test_app routes it gives

TypeError (no marshal_dump is defined for class Mutex)

if ran against Ruby 1.9.2 and rails 3.2.1. Sinatra app uses mongo gem.

Now when I run this app against ruby 1.8.7 and rails 3.2.1, it gives following error

TypeError (can't dump TCPSocket)

Any help is highly appreciated.

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

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

发布评论

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

评论(1

方圜几里 2025-01-14 21:56:51

假设您正确地需要 TestApp::Application ,我认为您的路线定义应该是:

match "/test_app", :to => TestApp::Application

请参阅 从外向内的铁路路由了解更多信息。

Assuming you've required your TestApp::Application correctly, I think your routes definition should be:

match "/test_app", :to => TestApp::Application

See Rails Routing from the Outside in for more info.

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