RSpec,加载助手时没有要加载的文件

发布于 2024-09-26 05:52:59 字数 197 浏览 1 评论 0原文

我有一个使用 RSpec2 beta 19 的 Sinatra 应用程序。我的 application.rb 和 app_helpers.rb 位于目录 /lib 中。应用程序显然加载了帮助程序模块并且我的应用程序运行,但是当我运行 RSpec 时,我收到一条错误,指出它无法找到帮助程序模块中所需的任何 gem。我现在确定如何加载 application.rb 而不会出现错误。

I have a Sinatra app that uses RSpec2 beta 19. My application.rb and app_helpers.rb are in a directory /lib. The application obviously loads the helper module and my application runs but when I run RSpec I get an error that it is unable to located any gems required in the helper module. I am now sure how to load the application.rb without getting errors.

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

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

发布评论

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

评论(2

酒与心事 2024-10-03 05:52:59

我听说,您可以尝试升级到 rspec-2.0.0.rc,最终版本应该在一周内可用。

You might try upgrading to rspec-2.0.0.rc, and the final version should be available within a week, so I've heard.

青衫儰鉨ミ守葔 2024-10-03 05:52:59

我发现我有多个版本的 rspec。我删除了它们并使用了 beta.22,它现在似乎可以工作了。

I found that I had multiple versions of rspec. I removed them and went with beta.22 and it seems to be working now.

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