Closed bmulholland closed 2 weeks ago
Looks like they are rubocop-rspec_rails and rubocop-factory_bot
I got the error: cannot load such file -- rubocop-rspec_rails
So I added gem "rubocop-rspec_rails", require: false
to my gemfile.
Hey @bmulholland 👋
The previously reported “cannot load such file” issue can be fixed by running rubocop --restart-server
as suggested here. My apologies for the inconvenience.
A PR to add gem names to the update guide is welcome! I was under the impression that rubocop would suggest extensions basing on the contents of the Gemfile, but this can be silenced or fail to work.
Hey @pirj ! Hope you're well :)
Happy to submit a PR to update the docs. I think this is the canonical version, is that right? https://docs.rubocop.org/rubocop-rspec/upgrade_to_version_3.html -- submitted https://github.com/rubocop/rubocop-rspec/pull/1927 to resolve this, including your troubleshooting suggestion. Doing this as a quick contribution, please let me know if I missed anything.
v3 upgrade says "If you are using the RSpec/Capybara, RSpec/FactoryBot, or RSpec/Rails departments, you need to install the corresponding gem"
But what are the corresponding gems? The doc lists "rubocop-capybara." We already have rubocop-rails installed. Is that it? And is the other one https://github.com/rubocop/rubocop-factory_bot ? Both well predate the v3 extraction, so it seems unlikely those are newly split.