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

(newer?) guard looks for the template file in a wrong place. #9

Open
artm opened this issue Jan 14, 2014 · 2 comments
Open

(newer?) guard looks for the template file in a wrong place. #9

artm opened this issue Jan 14, 2014 · 2 comments

Comments

@artm
Copy link

artm commented Jan 14, 2014

The error:

$ bundle exec guard init
./vendor/bundle/gems/guard-2.2.5/lib/guard/plugin/base.rb:53:in `read': No such file or directory @ rb_sysopen - ./vendor/bundle/gems/guard-mocha-node-0.0.6/lib/guard/mochanode/templates/Guardfile (Errno::ENOENT)
        from ./vendor/bundle/gems/guard-2.2.5/lib/guard/plugin/base.rb:53:in `template'
        from ./vendor/bundle/gems/guard-2.2.5/lib/guard/plugin_util.rb:129:in `block i```
...

Relevant bit from guard 2.2.5 lib/guard/plugin/base.rb:34:

        # Returns the non-namespaced name of the plugin
        #
        #
        # @example Non-namespaced name for Guard::RSpec
        #   Guard::RSpec.non_namespaced_name
        #   #=> "rspec"
        #
        # @return [String]
        #
        def non_namespaced_name
          non_namespaced_classname.downcase
        end



        # Specify the source for the Guardfile template.
        # Each Guard plugin can redefine this method to add its own logic.
        #
        # @param [String] plugin_location the plugin location
        #
        def template(plugin_location)
          File.read("#{ plugin_location }/lib/guard/#{ non_namespaced_name }/templates/Guardfile")
        end
      end
@JsonSam
Copy link

JsonSam commented Jan 28, 2014

Getting the same issue for some guard gems only.

$ bundle exec guard init rails-assets
/home/user/.rvm/gems/ruby-2.0.0-p353@apx/gems/guard-2.3.0/lib/guard/plugin/base.rb:53:in `read': No such file or directory - /home/user/.rvm/gems/ruby-2.0.0-@APX@anon-ui-gu/gems/guard-rails-assets-0.1.5/lib/guard/railsassets/templates/Guardfile (Errno::ENOENT)

$bundle exec guard init rails_best_practices
/home/user/.rvm/gems/ruby-2.0.0-p353@apx/gems/guard-2.3.0/lib/guard/plugin/base.rb:53:in `read': No such file or directory - /home/jefferson/.rvm/gems/ruby-2.0.0-p353@apx/gems/guard-rails_best_practices-0.1.3/lib/guard/railsbestpractices/templates/Guardfile (Errno::ENOENT)

@uriklar
Copy link

uriklar commented Apr 22, 2014

getting the same issue when using guard-rails-assets

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

3 participants