Cannot load guard/ui
lokeshh opened this issue · comments
I'm getting this error when I run guard
after installing guard
and guard-rspec
.
lokeshh:~/workspace/daru (cat_index) $ guard
Warning: you have a Gemfile, but you're not using bundler or RUBYGEMS_GEMDEPS
RubyDep: WARNING: Your Ruby is outdated/buggy. (To disable warnings, set RUBY_DEP_GEM_SILENCE_WARNINGS=1)
RubyDep: WARNING: Your Ruby is: 2.3.0 (buggy). Recommendation: install 2.3.1.
05:39:12 - INFO - Guard here! It looks like your project has a Gemfile, yet you are running
> [#] `guard` outside of Bundler. If this is your intent, feel free to ignore this
> [#] message. Otherwise, consider using `bundle exec guard` to ensure your
> [#] dependencies are loaded correctly.
> [#] (You can run `guard` with --no-bundler-warning to get rid of this message.)
05:39:13 - INFO - Guard::RSpec is running
05:39:13 - INFO - Guard is now watching at '/home/ubuntu/workspace/daru'
[1] guard(main)>
05:39:14 - INFO - Run all
05:39:14 - INFO - Running all specs
/home/ubuntu/.rvm/gems/ruby-2.3.0/gems/guard-rspec-4.7.0/lib/guard/rspec_formatter.rb:12:in `require': cannot load such file -- guard/ui (LoadError)
from /home/ubuntu/.rvm/gems/ruby-2.3.0/gems/guard-rspec-4.7.0/lib/guard/rspec_formatter.rb:12:in `<top (required)>'
from /home/ubuntu/.rvm/gems/ruby-2.3.0/gems/rspec-core-3.4.4/lib/rspec/core/configuration.rb:1295:in `require'
from /home/ubuntu/.rvm/gems/ruby-2.3.0/gems/rspec-core-3.4.4/lib/rspec/core/configuration.rb:1295:in `block in requires='
from /home/ubuntu/.rvm/gems/ruby-2.3.0/gems/rspec-core-3.4.4/lib/rspec/core/configuration.rb:1295:in `each'
from /home/ubuntu/.rvm/gems/ruby-2.3.0/gems/rspec-core-3.4.4/lib/rspec/core/configuration.rb:1295:in `requires='
from /home/ubuntu/.rvm/gems/ruby-2.3.0/gems/rspec-core-3.4.4/lib/rspec/core/configuration_options.rb:109:in `block in process_options_into'
from /home/ubuntu/.rvm/gems/ruby-2.3.0/gems/rspec-core-3.4.4/lib/rspec/core/configuration_options.rb:108:in `each'
from /home/ubuntu/.rvm/gems/ruby-2.3.0/gems/rspec-core-3.4.4/lib/rspec/core/configuration_options.rb:108:in `process_options_into'
from /home/ubuntu/.rvm/gems/ruby-2.3.0/gems/rspec-core-3.4.4/lib/rspec/core/configuration_options.rb:21:in `configure'
from /home/ubuntu/.rvm/gems/ruby-2.3.0/gems/rspec-core-3.4.4/lib/rspec/core/runner.rb:105:in `setup'
from /home/ubuntu/.rvm/gems/ruby-2.3.0/gems/rspec-core-3.4.4/lib/rspec/core/runner.rb:92:in `run'
from /home/ubuntu/.rvm/gems/ruby-2.3.0/gems/rspec-core-3.4.4/lib/rspec/core/runner.rb:78:in `run'
from /home/ubuntu/.rvm/gems/ruby-2.3.0/gems/rspec-core-3.4.4/lib/rspec/core/runner.rb:45:in `invoke'
from /home/ubuntu/.rvm/gems/ruby-2.3.0/gems/rspec-core-3.4.4/exe/rspec:4:in `<top (required)>'
from /home/ubuntu/.rvm/gems/ruby-2.3.0/bin/rspec:23:in `load'
from /home/ubuntu/.rvm/gems/ruby-2.3.0/bin/rspec:23:in `<main>'
from /home/ubuntu/.rvm/gems/ruby-2.3.0/bin/ruby_executable_hooks:15:in `eval'
from /home/ubuntu/.rvm/gems/ruby-2.3.0/bin/ruby_executable_hooks:15:in `<main>'
05:39:16 - ERROR - Failed: "bundle exec rspec -f progress -r /home/ubuntu/.rvm/gems/ruby-2.3.0/gems/guard-rspec-4.7.0/lib/guard/rspec_formatter.rb -f Guard::RSpecFormatter --failure-exit-code 2 spec" (exit code: 1)
[1] guard(main)>
Please help. I am installing guard so that it runs rspec automatically. Also I am using it for standard ruby gem development and not rails.
For a quick workaround, first try the following:
- Add to your
Gemfile
the following line:gem 'guard-rspec', '~> 4.6.5'
- Run Guard with
bundle exec guard
.
If you don't want to use bundler, you'll have to configure Guard::RSpec
to use rspec
instead of bundle exec rspec
for the :cmd
option in your Guardfile
.
Let me know if that helps.
It also looks like you have some kind of weird error that you shouldn't be getting. I'm guessing this is a bug.
Could you show your Gemfile
and Gemfile.lock
and Guardfile
files? Those three should be enough to help me reproduce the problem.
Here are the files you asked for: https://gist.github.com/lokeshh/ef481aef3b7419dde606beb5ca4f0d5f
Thank you for looking into this.
The quick work around which you mentioned is working. Thanks a lot.
Thanks so much for helping me reproduce this!
I'll release a fix shortly and close this when I'm done.
An update fixing this is released: https://github.com/guard/guard-rspec/releases/tag/v4.7.1
Thanks again!