0
私はいくつかのchefspecチュートリアルで作業しています。他の料理本/ライブラリに依存しているレシピでchefspecを実行するとエラーが発生する
私のコードベースには2つのcookbookがあり、cookbookBは他のcookbookで使用されている一般的なメソッド/ライブラリのコレクションです。 CookbookAはCookbookBに依存しており、これにメタデータが定義されています。
レシピは意図したとおりに実行され、目的の結果が得られます。
cookbookA上chef exec rspec spec
を実行している私は、このエラーが表示されます。
C:/opscode/chefdk/embedded/lib/ruby/gems/2.1.0/gems/berkshelf-4.3.5/lib/berkshelf/resolver.rb:85:in `rescue in resolve': Unable to satisfy constraints on packag
e sc_common, which does not exist, due to solution constraint (steve-solr = 0.1.1). Solution constraints that may result in a constraint on sc_common: [(steve-s
olr = 0.1.1) -> (sc_common >= 0.0.0)] (Berkshelf::NoSolutionError)
Missing artifacts: sc_common
Demand that cannot be met: (steve-solr = 0.1.1)
Unable to find a solution for demands: steve-solr (0.1.1)
from C:/opscode/chefdk/embedded/lib/ruby/gems/2.1.0/gems/berkshelf-4.3.5/lib/berkshelf/resolver.rb:75:in `resolve'
from C:/opscode/chefdk/embedded/lib/ruby/gems/2.1.0/gems/berkshelf-4.3.5/lib/berkshelf/installer.rb:175:in `install_from_universe'
from C:/opscode/chefdk/embedded/lib/ruby/gems/2.1.0/gems/berkshelf-4.3.5/lib/berkshelf/installer.rb:39:in `run'
from C:/opscode/chefdk/embedded/lib/ruby/gems/2.1.0/gems/berkshelf-4.3.5/lib/berkshelf/berksfile.rb:421:in `install'
from C:/opscode/chefdk/embedded/lib/ruby/gems/2.1.0/gems/berkshelf-4.3.5/lib/berkshelf/berksfile.rb:630:in `block in vendor'
from C:/opscode/chefdk/embedded/lib/ruby/2.1.0/tmpdir.rb:88:in `mktmpdir'
from C:/opscode/chefdk/embedded/lib/ruby/gems/2.1.0/gems/berkshelf-4.3.5/lib/berkshelf/berksfile.rb:628:in `vendor'
from C:/opscode/chefdk/embedded/lib/ruby/gems/2.1.0/gems/chefspec-4.7.0/lib/chefspec/berkshelf.rb:39:in `block in setup!'
from C:/opscode/chefdk/embedded/lib/ruby/gems/2.1.0/gems/thor-0.19.1/lib/thor/shell/basic.rb:20:in `mute'
from C:/opscode/chefdk/embedded/lib/ruby/gems/2.1.0/gems/chefspec-4.7.0/lib/chefspec/berkshelf.rb:35:in `setup!'
from C:/opscode/chefdk/embedded/lib/ruby/gems/2.1.0/gems/chefspec-4.7.0/lib/chefspec/berkshelf.rb:61:in `block (2 levels) in <top (required)>'
from C:/opscode/chefdk/embedded/lib/ruby/gems/2.1.0/gems/rspec-core-3.4.4/lib/rspec/core/example.rb:425:in `instance_exec'
from C:/opscode/chefdk/embedded/lib/ruby/gems/2.1.0/gems/rspec-core-3.4.4/lib/rspec/core/example.rb:425:in `instance_exec'
from C:/opscode/chefdk/embedded/lib/ruby/gems/2.1.0/gems/rspec-core-3.4.4/lib/rspec/core/hooks.rb:357:in `run'
from C:/opscode/chefdk/embedded/lib/ruby/gems/2.1.0/gems/rspec-core-3.4.4/lib/rspec/core/configuration.rb:1724:in `block in run_hooks_with'
from C:/opscode/chefdk/embedded/lib/ruby/gems/2.1.0/gems/rspec-core-3.4.4/lib/rspec/core/configuration.rb:1724:in `each'
from C:/opscode/chefdk/embedded/lib/ruby/gems/2.1.0/gems/rspec-core-3.4.4/lib/rspec/core/configuration.rb:1724:in `run_hooks_with'
from C:/opscode/chefdk/embedded/lib/ruby/gems/2.1.0/gems/rspec-core-3.4.4/lib/rspec/core/configuration.rb:1679:in `with_suite_hooks'
from C:/opscode/chefdk/embedded/lib/ruby/gems/2.1.0/gems/rspec-core-3.4.4/lib/rspec/core/runner.rb:118:in `block in run_specs'
from C:/opscode/chefdk/embedded/lib/ruby/gems/2.1.0/gems/rspec-core-3.4.4/lib/rspec/core/reporter.rb:77:in `report'
from C:/opscode/chefdk/embedded/lib/ruby/gems/2.1.0/gems/rspec-core-3.4.4/lib/rspec/core/runner.rb:117:in `run_specs'
from C:/opscode/chefdk/embedded/lib/ruby/gems/2.1.0/gems/rspec-core-3.4.4/lib/rspec/core/runner.rb:93:in `run'
from C:/opscode/chefdk/embedded/lib/ruby/gems/2.1.0/gems/rspec-core-3.4.4/lib/rspec/core/runner.rb:78:in `run'
from C:/opscode/chefdk/embedded/lib/ruby/gems/2.1.0/gems/rspec-core-3.4.4/lib/rspec/core/runner.rb:45:in `invoke'
from C:/opscode/chefdk/embedded/lib/ruby/gems/2.1.0/gems/rspec-core-3.4.4/exe/rspec:4:in `<top (required)>'
from C:/Users/Steve/AppData/Local/chefdk/gem/ruby/2.1.0/bin/rspec:22:in `load'
from C:/Users/Steve/AppData/Local/chefdk/gem/ruby/2.1.0/bin/rspec:22:in `<main>'
PS C:\Users\steve\Dev\steve-solr-restartcores\chef-repos\chef-test\cookbooks\steve-solr> chef exec rspec spec
C:/opscode/chefdk/embedded/lib/ruby/2.1.0/i386-mingw32/dl.so: warning: already initialized constant DL::RUBY_FREE
C:/opscode/chefdk/embedded/lib/ruby/gems/2.1.0/gems/net-ssh-3.1.1/lib/net/ssh/authentication/pageant.rb:16: warning: previous definition of RUBY_FREE was here
DL is deprecated, please use Fiddle
。ありがとう。
kyokou。私は、私がberkshelfをインストールしたことを知らなかった、私は明示的に任意の時点でそれを使用して覚えていないのでおそらくthereres問題 - 私は方向を見て、ありがとう! :D – null
スペックヘルパー(たぶん)に 'require 'chefspec/berkshelf''で設定します。 – coderanger
ありがとう! :Dはすべてセットアップされ、いくつかのテストに失敗する準備ができています:D – null