Skip to content

guard fails on windows #156

@attobyte

Description

@attobyte

Guard fails with ERROR - No such file or directory - bin/rails test when running bundle exec guard

Environment

Windows 10
Rails 5.2.2
guard-minitest 2.4.6

My guardfile has guard :minitest, spring: 'bin/rails test', all_on_start: false do

The file bin/rails has #!/usr/bin/env ruby which obiously will not work on Windows.

Several internet posts suggest modifying the guard file to:
guard :minitest, spring: 'rake test', all_on_start: false do
guard :minitest, all_on_start: false do

I went with this option thinking bin/rails script should be ran.
guard :minitest, spring: 'ruby bin/rails test', all_on_start: false do

ruby is in my path on the windows box using a rvm like utility.

Is there a recommended fix that is cross platform supported?

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