Skip to content

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

Description

@starrychloe

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions