どのようにしてここにguard init
たどり着いたのかはわかりませんが、 を実行するたびに、少しやり過ぎているように見えます。
実行後にコマンドラインに表示されるものは次のguard init
とおりです。
WARN: Unresolved specs during Gem::Specification.reset:
thor (>= 0.14.6)
lumberjack (>= 1.0.2)
ffi (>= 0.5.0)
WARN: Clearing out unresolved specs.
Please report a bug if this causes problems.
11:39:55 - INFO - Writing new Guardfile to /var/www/the-newbies-guide-to-test-driven-development/Guardfile
11:39:55 - INFO - coffeescript guard added to Guardfile, feel free to edit it
11:39:55 - INFO - coffeescript guard added to Guardfile, feel free to edit it
11:39:55 - INFO - coffeescript guard added to Guardfile, feel free to edit it
11:39:57 - INFO - compass guard added to Guardfile, feel free to edit it
11:39:57 - INFO - concat guard added to Guardfile, feel free to edit it
11:39:58 - INFO - livereload guard added to Guardfile, feel free to edit it
11:39:58 - INFO - livereload guard added to Guardfile, feel free to edit it
11:39:58 - INFO - There are 2 definitions in your Guardfile for 'livereload', you may want to clean up your Guardfile as this could cause issues.
11:39:58 - INFO - livereload guard added to Guardfile, feel free to edit it
11:39:58 - INFO - There are 3 definitions in your Guardfile for 'livereload', you may want to clean up your Guardfile as this could cause issues.
11:39:58 - INFO - phpunit guard added to Guardfile, feel free to edit it
11:39:58 - INFO - sass guard added to Guardfile, feel free to edit it
11:39:58 - INFO - sass guard added to Guardfile, feel free to edit it
11:39:58 - INFO - sass guard added to Guardfile, feel free to edit it
11:39:58 - INFO - sass guard added to Guardfile, feel free to edit it
11:39:58 - INFO - sass guard added to Guardfile, feel free to edit it
11:39:58 - INFO - uglify guard added to Guardfile, feel free to edit it
これが my の内容ですGuardfile
:
# A sample Guardfile
# More info at https://github.com/guard/guard#readme
guard 'coffeescript', :input => 'app/assets/javascripts'
guard 'coffeescript', :input => 'app/assets/javascripts'
guard 'coffeescript', :input => 'app/assets/javascripts'
guard 'compass' do
watch('^src/(.*)\.s[ac]ss')
end
# This will concatenate the javascript files specified in :files to public/js/all.js
guard :concat, type: "js", files: %w(), input_dir: "public/js", output: "public/js/all"
guard :concat, type: "css", files: %w(), input_dir: "public/css", output: "public/css/all"
guard 'livereload' do
watch(%r{app/views/.+\.(erb|haml|slim)$})
watch(%r{app/helpers/.+\.rb})
watch(%r{public/.+\.(css|js|html)})
watch(%r{config/locales/.+\.yml})
# Rails Assets Pipeline
watch(%r{(app|vendor)(/assets/\w+/(.+\.(css|js|html))).*}) { |m| "/assets/#{m[3]}" }
end
guard 'livereload' do
watch(%r{app/views/.+\.(erb|haml|slim)$})
watch(%r{app/helpers/.+\.rb})
watch(%r{public/.+\.(css|js|html)})
watch(%r{config/locales/.+\.yml})
# Rails Assets Pipeline
watch(%r{(app|vendor)(/assets/\w+/(.+\.(css|js|html))).*}) { |m| "/assets/#{m[3]}" }
end
guard 'livereload' do
watch(%r{app/views/.+\.(erb|haml|slim)$})
watch(%r{app/helpers/.+\.rb})
watch(%r{public/.+\.(css|js|html)})
watch(%r{config/locales/.+\.yml})
# Rails Assets Pipeline
watch(%r{(app|vendor)(/assets/\w+/(.+\.(css|js|html))).*}) { |m| "/assets/#{m[3]}" }
end
guard 'phpunit', :cli => '--colors' do
watch(%r{^.+Test\.php$})
end
guard 'sass', :input => 'sass', :output => 'css'
guard 'sass', :input => 'sass', :output => 'css'
guard 'sass', :input => 'sass', :output => 'css'
guard 'sass', :input => 'sass', :output => 'css'
guard 'sass', :input => 'sass', :output => 'css'
guard 'uglify', :destination_file => "public/javascripts/application.js" do
watch (%r{app/assets/javascripts/application.js})
end
明らかに、重複した行を削除することができますが、そもそもなぜそれが起こったのか疑問に思っていました.