Skip to content

Rubocop-rails error #277

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Open
guizaols opened this issue Apr 15, 2021 · 2 comments
Open

Rubocop-rails error #277

guizaols opened this issue Apr 15, 2021 · 2 comments
Assignees

Comments

@guizaols
Copy link

I'm using these versions of gems and getting the error below. Any clue?

- rubocop (1.12.0)
- rubocop-performance (1.10.2)
- rubocop-rails (2.9.1)
- rubocop-rspec (2.2.0)
- rubocop-shopify (2.0.1)
/usr/local/lib/ruby/site_ruby/2.4.0/rubygems/core_ext/kernel_require.rb:122:in `require': cannot load such file -- rubocop-rails (LoadError)
	from /usr/local/lib/ruby/site_ruby/2.4.0/rubygems/core_ext/kernel_require.rb:122:in `require'
	from /usr/local/bundle/gems/rubocop-0.52.1/lib/rubocop/config_loader_resolver.rb:15:in `block in resolve_requires'
	from /usr/local/bundle/gems/rubocop-0.52.1/lib/rubocop/config_loader_resolver.rb:11:in `each'
	from /usr/local/bundle/gems/rubocop-0.52.1/lib/rubocop/config_loader_resolver.rb:11:in `resolve_requires'
	from /usr/local/bundle/gems/rubocop-0.52.1/lib/rubocop/config_loader.rb:38:in `load_file'
	from /usr/local/bundle/gems/rubocop-0.52.1/lib/rubocop/config_loader.rb:79:in `configuration_from_file'
	from /usr/local/bundle/gems/rubocop-0.52.1/lib/rubocop/config_store.rb:44:in `for'
	from /usr/src/app/lib/cc/engine/file_list_resolver.rb:38:in `rubocop_file_to_include?'
	from /usr/src/app/lib/cc/engine/file_list_resolver.rb:16:in `block in expanded_list'
	from /usr/src/app/lib/cc/engine/file_list_resolver.rb:13:in `each'
	from /usr/src/app/lib/cc/engine/file_list_resolver.rb:13:in `flat_map'
	from /usr/src/app/lib/cc/engine/file_list_resolver.rb:13:in `expanded_list'
	from /usr/src/app/lib/cc/engine/rubocop.rb:49:in `files_to_inspect'
	from /usr/src/app/lib/cc/engine/rubocop.rb:29:in `block in run'
	from /usr/src/app/lib/cc/engine/rubocop.rb:28:in `chdir'
	from /usr/src/app/lib/cc/engine/rubocop.rb:28:in `run'
	from /usr/src/app/bin/codeclimate-rubocop:17:in `<main>'
@noelia-lencina
Copy link

Hi @guizaols, this is likely happening because the rubocop version being used by codeclimate with your current configuration is quite old. You could try updating your .codeclimate.yml file to use a different channel for this plugin (currently, our last version is for rubocop 1.10). Here there's an example of a configuration file that uses a particular rubocop version. Specifically, this part of the config:

plugins:
  rubocop:
    enabled: true
    channel: "rubocop-0-49" # you can change this to use the version you want, have a look at the different channels here: https://github.com/codeclimate/codeclimate-rubocop/branches/all

Let me know if this helps you.

@guizaols
Copy link
Author

guizaols commented Apr 16, 2021

Hey @noelia-lencina thanks for your quick reply.
I'm using the version 1.12. That's why it's breaking I guess.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants