Rubocop 找不到 inherit_gem
Rubocop cant find inherit_gem
运行 来自我的 rails 应用根目录的 rubocop 配置为使用 inherit_gem 属性 给出了错误;
Unable to find gem gem_name; is the gem installed? Gem::MissingSpecError
但是 gem 我确认 gem 安装了 bundler 并在 Gemfile 中。
我错过了什么?
参考 https://github.com/bbatsov/rubocop/blob/master/manual/configuration.md#inheriting-configuration-from-a-remote-url ,错误是因为 inherit_gem 是通过捆绑程序安装的。所以 rubocop
必须像捆绑器一样被调用;
$ bundle exec rubocop <options...>
运行 来自我的 rails 应用根目录的 rubocop 配置为使用 inherit_gem 属性 给出了错误;
Unable to find gem gem_name; is the gem installed? Gem::MissingSpecError
但是 gem 我确认 gem 安装了 bundler 并在 Gemfile 中。
我错过了什么?
参考 https://github.com/bbatsov/rubocop/blob/master/manual/configuration.md#inheriting-configuration-from-a-remote-url ,错误是因为 inherit_gem 是通过捆绑程序安装的。所以 rubocop
必须像捆绑器一样被调用;
$ bundle exec rubocop <options...>