我正在尝试为 rspec-puppet 测试编写测试。
该模块具有以下树:
|-- manifests
| `-- test_file.pp
|-- Rakefile
`-- spec
|-- classes
|-- defines
| `-- test_file_spec.rb
|-- fixtures
| |-- manifests
| | `-- site.pp
| `-- modules
| `-- test
| |-- files -> ../../../../files
| |-- lib -> ../../../../lib
| |-- manifests -> ../../../../manifests
| `-- templates -> ../../../../templates
|-- functions
|-- hosts
`-- spec_helper.rb
运行“rake rspec”时出现以下错误
(in /etc/puppetlabs/puppet/modules/offshore/test)
rake aborted!
no such file to load -- rspec/core/rake_task
/etc/puppetlabs/puppet/modules/offshore/test/Rakefile:2
(See full trace by running task with --trace)
当我运行“rake spec --trace”时,它会给出以下信息:
rake aborted!
no such file to load -- rspec/core/rake_task
/usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
/usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
/etc/puppetlabs/puppet/modules/offshore/test/Rakefile:2
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2382:in `load'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2382:in `raw_load_rakefile'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2016:in `load_rakefile'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2067:in `standard_exception_handling'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2015:in `load_rakefile'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:1999:in `run'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2067:in `standard_exception_handling'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:1997:in `run'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/bin/rake:31
/usr/bin/rake:19:in `load'
/usr/bin/rake:19
有人可以帮我设置吗?