-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
require': cannot load such file -- onfgaton fo bocop (LoadError) #1504
Comments
“onfgaton fo bocop”? I wonder what is in your If you're unsure whether your config file is in the right format or not, try removing it and have Rubocop create one for you, using |
Yes, that’s it! If the configuration file is malformed (e.g. doesn’t define a hash), # rubocop-0.28.0/lib/rubocop/config_loader.rb:39
Array(hash.delete('require')).each { |r| require(r) }
{ "require" => %w(one_file another_file) }.delete("require")
#=> ["one_file", "another_file"]
"Configuration for rubocop".delete("require")
#=> "Confgaton fo bocop" Maybe we should ensure that |
@bquorning Sounds like a good idea to me. Thanks for the explanation! |
I have added .rubocop.yml file in cookbook root dir and started getting this error
/opt/chef/embedded/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in
require': cannot load such file -- onfgaton fo bocop (LoadError) from /opt/chef/embedded/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in
require'from /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/rubocop-0.28.0/lib/rubocop/config_loader.rb:39:in
block in load_file' from /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/rubocop-0.28.0/lib/rubocop/config_loader.rb:39:in
each'from /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/rubocop-0.28.0/lib/rubocop/config_loader.rb:39:in
load_file' from /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/rubocop-0.28.0/lib/rubocop/config_loader.rb:93:in
configuration_from_file'from /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/rubocop-0.28.0/lib/rubocop/config_store.rb:40:in
for' from /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/rubocop-0.28.0/lib/rubocop/target_finder.rb:111:in
excluded_dirs'from /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/rubocop-0.28.0/lib/rubocop/target_finder.rb:90:in
find_files' from /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/rubocop-0.28.0/lib/rubocop/target_finder.rb:60:in
target_files_in_dir'from /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/rubocop-0.28.0/lib/rubocop/target_finder.rb:31:in
find' from /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/rubocop-0.28.0/lib/rubocop/runner.rb:47:in
find_target_files'from /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/rubocop-0.28.0/lib/rubocop/runner.rb:18:in
run' from /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/rubocop-0.28.0/lib/rubocop/cli.rb:24:in
run'from /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/rubocop-0.28.0/bin/rubocop:13:in
block in <top (required)>' from /opt/chef/embedded/lib/ruby/1.9.1/benchmark.rb:295:in
realtime'from /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/rubocop-0.28.0/bin/rubocop:12:in
<top (required)>' from /opt/chef/embedded/bin/rubocop:23:in
load'from /opt/chef/embedded/bin/rubocop:23:in `'
any help is really appreciated
The text was updated successfully, but these errors were encountered: