我是 Serverspec 测试工具的新手。
运行测试时,出现以下错误。
[root@ost-svr004 serverspec]# rake spec
/usr/bin/ruby -I/usr/lib/ruby/gems/2.1.0/gems/rspec-support-3.1.2/lib:/usr/lib/ruby/gems/2.1.0/gems/rspec-core-3.1.7/lib /usr/lib/ruby/gems/2.1.0/gems/rspec-core-3.1.7/exe/rspec --pattern spec/www.example.jp/\*_spec.rb
/usr/lib/ruby/gems/2.1.0/gems/net-ssh-2.9.1/lib/net/ssh/transport/session.rb:70:in `initialize': getaddrinfo: Name or service not known (SocketError)
from /usr/lib/ruby/gems/2.1.0/gems/net-ssh-2.9.1/lib/net/ssh/transport/session.rb:70:in `open'
from /usr/lib/ruby/gems/2.1.0/gems/net-ssh-2.9.1/lib/net/ssh/transport/session.rb:70:in `block in initialize'
from /usr/lib/ruby/2.1.0/timeout.rb:76:in `timeout'
from /usr/lib/ruby/2.1.0/timeout.rb:127:in `timeout'
from /usr/lib/ruby/gems/2.1.0/gems/net-ssh-2.9.1/lib/net/ssh/transport/session.rb:67:in `initialize'
from /usr/lib/ruby/gems/2.1.0/gems/net-ssh-2.9.1/lib/net/ssh.rb:202:in `new'
from /usr/lib/ruby/gems/2.1.0/gems/net-ssh-2.9.1/lib/net/ssh.rb:202:in `start'
.....
/usr/bin/ruby -I/usr/lib/ruby/gems/2.1.0/gems/rspec-support-3.1.2/lib:/usr/lib/ruby/gems/2.1.0/gems/rspec-core-3.1.7/lib /usr/lib/ruby/gems/2.1.0/gems/rspec-core-3.1.7/exe/rspec --pattern spec/www.example.jp/\*_spec.rb failed
在 Serverspec 安装期间,我按照http://serverspec.org/中的说明进行操作。作为先决条件,我还安装了“开发者工具”、Ruby 和 RubyGem。