Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot run guard-test: `require': cannot load such file — test_helper (LoadError) #63

Open
starrychloe opened this issue Jan 5, 2018 · 1 comment

Comments

@starrychloe
Copy link

https://stackoverflow.com/questions/48105845/cannot-run-guard-test-require-cannot-load-such-file-test-helper-loaderro

I installed guard-test but it won't run.

>bundle exec guard
  Please add the following to your Gemfile to avoid polling for changes:
    gem 'wdm', '>= 0.1.0' if Gem.win_platform?
19:54:44 - INFO - Run 'gem install win32console' to use color on Windows
19:54:45 - INFO - Guard::Test 2.0.8 is running, with Test::Unit 3.2.7!
19:54:45 - INFO - Running all tests
test/controllers/brokers_controller_test.rb:1:in `require': cannot load such file -- test_helper (LoadError)
        from test/controllers/brokers_controller_test.rb:1:in `<top (required)>'
        from -e:1:in `load'
        from -e:1:in `block in <main>'
        from -e:1:in `each'
        from -e:1:in `<main>'
[1] guard(main)>  Guard is now watching at ...

That is the first line in the test, in all tests:

>head -1 test/controllers/brokers_controller_test.rb
require 'test_helper'

Rails test works fine:

>rails test test/controllers/brokers_controller_test.rb
Run options: --seed 56448

# Running:

.......

Finished in 41.778710s, 0.1675 runs/s, 0.2394 assertions/s.

7 runs, 10 assertions, 0 failures, 0 errors, 0 skips

My Guardfile is the default from guard init test.

Rails 5.0.2, Windows

@rymai
Copy link
Member

rymai commented Jan 11, 2018

How is guard-test installed? Via Bundler or via Rubygems? Consider using the rubygems: true option in the latter case, see https://github.com/guard/guard-test#options.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants