“错误 Errno::EPIPE:管道损坏”与库勒里蒂
我最近安装了 culerity 以在黄瓜上使用。但是当我运行我的黄瓜规格时,它们变成红色(之前它们都是绿色的)。
我收到的错误具有以下形式:
速度::异常::导航异常: com.gargoylesoftware.htmlunit.FailingHttpStatusCodeException: 500 内部服务器错误 http://localhost:3001/ (Culerity::CulerityException) features/admin.feature:82:in `而我是 已登录'
当我查看 Web 服务器控制台(由 rake culerity:rails:start
启动)时,错误为:
错误 Errno::EPIPE:管道损坏
我注意到每当我有执行 $browser.goto 的黄瓜步骤(如“转到”)时,就会发生这些错误。
有什么想法吗?
PS:我已确保 JRuby 已安装并位于我的路径中
I've recently installed culerity to use on top of cucumber. But when I run my cucumber specs, they turn red (they were all green before).
The errors I get have this form:
Celerity::Exception::NavigationException:
com.gargoylesoftware.htmlunit.FailingHttpStatusCodeException:
500 Internal Server Error for
http://localhost:3001/
(Culerity::CulerityException)
features/admin.feature:82:in `And I am
logged in'
When I look at the web server console (launched by rake culerity:rails:start
), the error is:
ERROR Errno::EPIPE: Broken pipe
I've noticed that these errors happen whenever I have cucumber steps (like "go to") that do $browser.goto.
Any idea ?
PS: I have made sure that JRuby is installed and in my path
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
我相信将 jruby 升级到与我们正在运行的 ruby 补丁级别匹配的版本解决了我们的问题,我们必须从源代码安装 jruby 才能获得正确的版本
i believe that an upgrade of jruby to a version matching the patch level of ruby that we were running solved our issue, we had to install jruby from source to get the right one
这是 gem 的自述文件中的内容:
This is what the readme for the gem states:
也许这与我遇到的问题有关: http://github.com/langalex /culerity/issues/#issue/29
maybe this is related to the issue that i experienced: http://github.com/langalex/culerity/issues/#issue/29
我们在 Bundler 上的 Rails 应用程序中遇到了类似的问题(管道损坏):
实际上并没有启动服务器,陷入了
困境。
结果 Bundler 与
RUBYOPT
env var 混淆(请参阅 Bundler 如何修改环境 了解详细信息),bin/run_celerity_server.rb
(来自 culerity gem)使用 JRuby 作为解释器运行,JRuby 尊重 RUBYOPT。由于 Bundler 不是 JRuby gem,因此该脚本不会启动服务器。
Culerity::run_server
必须在无 Bundler 的环境中调用(即使用干净的RUBYOPT
)We ran into a similar problem (broken pipe) with a Rails app on Bundler:
didn't actually start the server, leaving
high and dry.
Turns out Bundler messes with
RUBYOPT
env var (see how Bundler modifies the environment for details),bin/run_celerity_server.rb
(from the culerity gem) runs with JRuby as interpreter and JRuby honors RUBYOPT.As Bundler is not a JRuby gem, the script does not start the server.
Culerity::run_server
must be invoked in a Bundler-free environment (i.e., with a cleanRUBYOPT
)