rails_best_practices icon indicating copy to clipboard operation
rails_best_practices copied to clipboard

Not detecting config file change

Open damien-roche opened this issue 12 years ago • 5 comments

Steps:

  1. bundle exec rails_best_practices app
  2. bundle exec rails_best_practices -g
  3. change options in app/config/rails_best_practices.yml
  4. repeat 1

I did this, and although I removed some checks (1.9 hash), the checks are still being run.

Ideas?

damien-roche avatar Jul 30 '12 18:07 damien-roche

could you try

$ cd app $ bundle exec rails_best_practices -g $ vi config/rails_best_practices.yml $ bundle exec rails_best_practices

flyerhzm avatar Jul 31 '12 06:07 flyerhzm

Thanks for the help.

That does exactly the same thing. rails_best_practices is not using the config file, it must be using a cached config file or default behavior.

I have since uninstalled:

  1. be (bundle exec) gem uninstall rails_best_practices
  2. be install << successfully reinstalled rails_best_practices
  3. be rails_best_practices app

...config file still not being used.

damien-roche avatar Jul 31 '12 07:07 damien-roche

sorry that I can't reproduce this issue.

could you print custom_config https://github.com/railsbp/rails_best_practices/blob/master/lib/rails_best_practices/core/runner.rb#L42 to see if the config file exists?

flyerhzm avatar Jul 31 '12 08:07 flyerhzm

Sorry, how would I print the custom_config variable from bundle exec context?

If this doesn't give me any indication I'll see about completely removing the gem from all sources and reinstalling to let you know if that worked.

damien-roche avatar Jul 31 '12 08:07 damien-roche

you can get gem path by bundle show rails_best_practices, and then add debug code

flyerhzm avatar Jul 31 '12 08:07 flyerhzm