5
5

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

[serverspec]Circular dependency detectedエラーが出てしまう

Last updated at Posted at 2014-11-09

serverspecの初期設定をし

bash-3.2$ bundle exec serverspec-init
Select OS type:

  1) UN*X
  2) Windows

Select number: 1

Select a backend type:

  1) SSH
  2) Exec (local)

Select number: 1

Vagrant instance y/n: y
Auto-configure Vagrant from Vagrantfile? y/n: y
 + spec/
 + spec/default/
 + spec/default/sample_spec.rb
 + spec/spec_helper.rb
 + Rakefile
 + .rspec

serverspecを実行すると下記エラーがでる

ruby
bash-3.2$ bundle exec rake spec
rake aborted!
Circular dependency detected: TOP => spec => spec:all => spec:default => spec:all

Tasks: TOP => spec => spec:all => spec:default
(See full trace by running task with --trace)
bash-3.2$ bundle exec rake spec --trace
** Invoke spec (first_time)
** Invoke spec:all (first_time)
** Invoke spec:default (first_time)
rake aborted!

によると、バグではないが仕様のようであるとのこと。

すでに修正ブランチができていて、マージ済みのようですね
https://github.com/serverspec/serverspec/pull/487

暫定でなおすにはRakefileで下記のコメントあうと

ruby

namespace :spec do
  targets = []
  Dir.glob('./spec/*').each do |dir|
next unless File.directory?(dir)
targets << File.basename(dir)
  end

  task :all     => targets
  # task :default => :all #ここをコメントアウト

をしてあげれば実行できることが確認できた。
ただ、影響範囲がわからいので、とりあえず勉強のために動かすようの処置ってことで・・・

5
5
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
5
5

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?