如何在Cloud9上执行RSpec

时间:2012-10-29 10:32:56

标签: rspec cloud9-ide

每当我尝试运行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规范?

1 个答案:

答案 0 :(得分:0)

我能够在cloud9上运行mini-test,test :: unit和rspec测试。 我认为你得到的错误要么是因为spork还是试图使用drb(带警卫或其他东西)

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

我也无法得到正确的工作。它会看到文件发生了变化,但是当运行规范时,我收到了有关Unknown开关-f -r -out的错误。对它的研究指向了bundler,并且可能需要在将命令发送到系统之前将命令包装在引号中。 (也许)

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