I am trying to create a Guardfile inside a small Ruby with some Ruby files and RSpec tests. This is not a Rails project.
When I run gem install guard
, I get the following:
$ gem install guard Fetching: listen-1.3.1.gem (100%) Successfully installed listen-1.3.1 Fetching: lumberjack-1.0.4.gem (100%) Successfully installed lumberjack-1.0.4 Fetching: guard-1.8.3.gem (100%) Successfully installed guard-1.8.3 Installing ri documentation for listen-1.3.1 Installing ri documentation for lumberjack-1.0.4 unable to convert "\xCF" from ASCII-8BIT to UTF-8 for bin/fsevent_watch_guard, skipping Installing ri documentation for guard-1.8.3 3 gems installed
Obviously, "\ xCF" must be installed, but it is not. I can’t understand what it is and whether this is the probable cause of my problem.
Later, when I try to create protection for RSpec tests, the following happens:
$ guard init rspec 19:45:11 - INFO - Writing new Guardfile to /home/kathryn/demo3/Guardfile 19:45:11 - ERROR - Could not load 'guard/rspec' or '~/.guard/templates/rspec' or find class Guard::Rspec
As INFO prompts, a new Guardfile is created, but it is filled with a note directing me to the README for the gem, and not to the guard for RSpec. If I manually add protection for RSpec and then try to start guard
, the result is as follows:
$ guard 19:41:03 - ERROR - Could not load 'guard/rspec' or find class Guard::Rspec 19:41:03 - ERROR - cannot load such file
I see that the stone cannot find the files that it needs, but I'm not quite sure where to go from here. This is my first time using security. Any help is appreciated.
This is my current Guardfile:
guard :rspec do watch(%r{^spec/.+_spec\.rb$}) watch(%r{^lib/(.+)\.rb$}) { |m| "spec/lib/#{m[1]}_spec.rb" } watch('spec/spec_helper.rb') { "spec" } end
It was not created automatically. When I first created the Guardfile, the content was:
I added a guard for RSpec, which appeared as the main protector of the RubyGem project here: https://github.com/guard/guard-rspec . (To be clear, I do not use this gem. It was a simple place to find a guard.)