guard-rails_best_practices icon indicating copy to clipboard operation
guard-rails_best_practices copied to clipboard

No such file or directory when trying to init

Open jmuheim opened this issue 12 years ago • 17 comments

$ guard init rails_best_practices
/Users/josh/.rvm/gems/ruby-2.0.0-p353@transition/gems/guard-2.2.5/lib/guard/plugin/base.rb:53:in `read': No such file or directory - /Users/josh/.rvm/gems/ruby-2.0.0-p353@transition/gems/guard-rails_best_practices-0.1.3/lib/guard/railsbestpractices/templates/Guardfile (Errno::ENOENT)
    from /Users/josh/.rvm/gems/ruby-2.0.0-p353@transition/gems/guard-2.2.5/lib/guard/plugin/base.rb:53:in `template'
    from /Users/josh/.rvm/gems/ruby-2.0.0-p353@transition/gems/guard-2.2.5/lib/guard/plugin_util.rb:129:in `block in add_to_guardfile'

jmuheim avatar Dec 16 '13 20:12 jmuheim

Same here

tetherit avatar Dec 22 '13 12:12 tetherit

same

jakecraige avatar Jan 20 '14 19:01 jakecraige

I am also getting the same problem.

JsonSam avatar Jan 30 '14 05:01 JsonSam

I was encountering the same issue with init as well, it appears when guard is trying to load the plugin it may be stripping the underscores in the path name, you can avoid init and just place the following in your Guardfile

guard :rails_best_practices do
  watch(%r{^app/(.+)\.rb$})
end

stevestmartin avatar Jan 30 '14 15:01 stevestmartin

Where can we see our results?? As usual like .rails_best_practises . uh???

On Thu, Jan 30, 2014 at 9:25 PM, Stephen St. Martin < [email protected]> wrote:

I was encountering the same issue with init as well, it appears when guard is trying to load the plugin it may be stripping the underscores in the path name, you can avoid init and just place the following in your Guardfile

guard :rails_best_practices do watch(%r{^app/(.+).rb$})end

Reply to this email directly or view it on GitHubhttps://github.com/logankoester/guard-rails_best_practices/issues/9#issuecomment-33700914 .

JsonSam avatar Feb 03 '14 07:02 JsonSam

It's working well. thanks. How can I store the results in a file??

On Mon, Feb 3, 2014 at 1:02 PM, Jefferson Sampaul < [email protected]> wrote:

Where can we see our results?? As usual like .rails_best_practises . uh???

On Thu, Jan 30, 2014 at 9:25 PM, Stephen St. Martin < [email protected]> wrote:

I was encountering the same issue with init as well, it appears when guard is trying to load the plugin it may be stripping the underscores in the path name, you can avoid init and just place the following in your Guardfile

guard :rails_best_practices do watch(%r{^app/(.+).rb$})end

Reply to this email directly or view it on GitHubhttps://github.com/logankoester/guard-rails_best_practices/issues/9#issuecomment-33700914 .

JsonSam avatar Feb 03 '14 07:02 JsonSam

I'm having this issue as well.

DanielOchoa avatar Feb 17 '14 17:02 DanielOchoa

Thanks stevestmartin, that worked for me.

DanielOchoa avatar Feb 17 '14 17:02 DanielOchoa

I am getting somthing similar:

12:38:28 - ERROR - Could not load 'guard/rails_best_practices' or '~/.guard/templates/rails_best_practices' or find class Guard::Rails_best_practices

RomanCPodolski avatar Dec 04 '14 11:12 RomanCPodolski

Can anyone confirm this with the latest master?

logankoester avatar Jan 06 '15 00:01 logankoester

yeah i do:

16:37:16 - ERROR - Could not load 'guard/rails_best_practices' or '~/.guard/templates/rails_best_practices' or find class Guard::Rails_best_practices

using:

gem 'guard-rails_best_practices', git: "https://github.com/logankoester/guard-rails_best_practices.git"

and running:

$ bundle exec guard init

guiceolin avatar Jan 09 '15 18:01 guiceolin

same here

tomoyuki28jp avatar Mar 26 '15 09:03 tomoyuki28jp

Not only does init not work but I can't even get it to run when I manually add the code to my Guardfile:

❯ be guard 13:48:10 - ERROR - Could not load 'guard/rails_best_practices' or find class Guard::RailsBestPractices 13:48:10 - ERROR - Invalid Guardfile, original error is: ...

[#] Could not load class: "RailsBestPractices",

ghost avatar Apr 06 '15 20:04 ghost

For now, reference the repo direct:

gem 'guard-rails_best_practices', git: 'https://github.com/logankoester/guard-rails_best_practices.git'

delameko avatar Apr 08 '15 11:04 delameko

Using the Github repo as shown above still has the init problem for me but it does run fine after adding the Guardfile watch code.

ghost avatar Apr 30 '15 16:04 ghost

I encountered similar problem

nathans-MacBook:eyehawk nathansire$ bundle exec guard init rails_best_practices 23:59:13 - ERROR - Could not load 'guard/rails_best_practices' or '~/.guard/templates/rails_best_practices' or find class Guard::Rails_best_practices

[#]

guard :rails_best_practices do watch(%r{^app/(.+).rb$}) end

produces

Could not load class: "RailsBestPractices"

natesire avatar Nov 01 '16 04:11 natesire

I had a same problem with the rubygems.org version, but it didn't reproduce with the master branch of github.

My Gemfile below

  gem 'guard-rails_best_practices', github: 'logankoester/guard-rails_best_practices'

tamano avatar Nov 08 '16 09:11 tamano