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
undefined method `gem_dir' for nil:NilClass when running the rubocop command on 0.35.0 #2411
Comments
I'm not sure why you get that |
Thanks for taking a look. I'll do some deeper debugging on my end and see if I can come up with some more specific. I included
I thought that mean |
The problem was discovered in rubocop#2411, but this change does not fix the problem reported there. Make configuration loading work as described in the README regarding precedence of `.rubocop.yml`, `inherit_from`, and `inherit_gem`. Remove `rubocop: config/default.yml` from the example in the README as it makes no sense. All configurations are based on the `default.yml` of the `rubocop` being run.
@roberts1000 Do you still have the same problem after removing |
I just upgraded from 0.34.2 to 0.35.0. I'm using the inherit_gem functionality, but I'm getting this error.
The .rubocop.yml in my application has:
Here is what I have observed:
:git
option in our application's Gemfile. This worked locally; we were able to use the inherit_gem functionality in development. However, our CI pipeline would generate errors during a deploy. We eventually traced it back to "something" with rubocop. If we stopped using :git and just used rubocop 0.34.2 without inherit_gem then our CI deployments worked fine.:path
option, the inherit_gem functionality works fine. On my local development machine, I'm able to use inherit_gem to pull the .rubocop.yml out of my_gem. As soon as I drop the :path option in the application's Gemfile, I get the above error.my_gem doesn't do anything crazy. It's a very simple gem that just holds config/.rubocop.yml file and it installs an executable named
rubo
which executes the rubocop with specific options so we can have a simple standard command for our team.The text was updated successfully, but these errors were encountered: