3

每次我尝试运行rake specbundle exec rspec spec出现 Permission denied - bind(2)错误时。痕迹:

/opt/rh/ruby193/root/usr/bin/ruby -S rspec ./spec/requests/user_pages_spec.rb ./spec/requests/static_pages_spec.rb ./spec/models/user_spec.rb 
/opt/rh/ruby193/root/usr/share/ruby/drb/drb.rb:861:in `initialize': Permission denied - bind(2) (Errno::EACCES) 
from /opt/rh/ruby193/root/usr/share/ruby/drb/drb.rb:861:in `open' 
from /opt/rh/ruby193/root/usr/share/ruby/drb/drb.rb:861:in `open_server' 
from /opt/rh/ruby193/root/usr/share/ruby/drb/drb.rb:759:in `block in open_server' 
from /opt/rh/ruby193/root/usr/share/ruby/drb/drb.rb:757:in `each' 
from /opt/rh/ruby193/root/usr/share/ruby/drb/drb.rb:757:in `open_server' 
from /opt/rh/ruby193/root/usr/share/ruby/drb/drb.rb:1342:in `initialize' 
from /opt/rh/ruby193/root/usr/share/ruby/drb/drb.rb:1624:in `new' 
from /opt/rh/ruby193/root/usr/share/ruby/drb/drb.rb:1624:in `start_service' 
from /var/lib/stickshift/32aa546379f04c6dadc139307dce80f1/app-root/data/lib/ruby/gems/gems/rspec-core-2.11.1/lib/rspec/core/drb_command_line.rb:17:in `run' 
from /var/lib/stickshift/32aa546379f04c6dadc139307dce80f1/app-root/data/lib/ruby/gems/gems/rspec-core-2.11.1/lib/rspec/core/runner.rb:63:in `run' 
from /var/lib/stickshift/32aa546379f04c6dadc139307dce80f1/app-root/data/lib/ruby/gems/gems/rspec-core-2.11.1/lib/rspec/core/runner.rb:8:in `block in autorun' 
rake aborted! 
/opt/rh/ruby193/root/usr/bin/ruby -S rspec ./spec/requests/user_pages_spec.rb ./spec/requests/static_pages_spec.rb ./spec/models/user_spec.rb failed 

Tasks: TOP => spec

cloud9 是否支持规范?

4

1 回答 1

0

我能够在 cloud9 上运行 mini-test、test::unit 和 rspec 测试。我认为您遇到的错误是由于 spork 或尝试使用 drb (带有警卫或其他东西)

我试图让它也能正常工作,但我无法让 spork 绑定到 $PORT,而且似乎不允许您绑定到任何其他端口。

我也无法让警卫正常工作。它会看到文件已更改,但在运行规范时,我收到有关未知开关 -f -r -out 的错误。对此的研究指向捆绑器,并且可能需要在将命令发送到系统之前将它们用引号括起来。(也许)

如果你摆脱了任何与 drb 或 spork 相关的东西,我敢打赌你的测试会奏效。

于 2012-11-08T22:41:16.737 回答