logankoester / guard-rails_best_practices

Guard for rails_best_practices, a code metric tool to check the quality of rails code.

Home Page:http://rubygems.org/gems/guard-rails_best_practices

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

No such file or directory when trying to init

jmuheim opened this issue · 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'

Same here

commented

I am also getting the same problem.

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
commented

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 <
notifications@github.com> 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//issues/9#issuecomment-33700914
.

commented

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 <
jeffersonsampaul06@gmail.com> 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 <
notifications@github.com> 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//issues/9#issuecomment-33700914
.

I'm having this issue as well.

Thanks stevestmartin, that worked for me.

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

Can anyone confirm this with the latest master?

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
commented

same here

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",

For now, reference the repo direct:

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

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.

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"

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'