I have permission to update the cookbook but this error is coming even
listing the nodes.
C:\Users\dharmesh.patel\chef-repo\chef-repo\trunk>knife node list
ERROR: You have an error in your config file
C:/Users/dharmesh.patel/chef-repo/c
hef-repo/trunk/.chef/knife.rb
TypeError: can’t convert nil into String
C:/Users/dharmesh.patel/chef-repo/chef-repo/trunk/.chef/knife.rb:3:in initial ize' C:/Users/dharmesh.patel/chef-repo/chef-repo/trunk/.chef/knife.rb:3:inopen’
C:/Users/dharmesh.patel/chef-repo/chef-repo/trunk/.chef/knife.rb:3:in
`from_st
ring’
It looks like the author of your knife.rb file expected the environment
variable, “CHEF_CONFIG“, to exist and it doesn’t. That is,
ENV["CHEF_CONFIG"] is returning nil which in turn can’t be used as a file
name to open.
I’m guessing here, but it looks like the intention was for that environment
variable to contain the path to a YAML file that has some configuration in
it? This isn’t a default behavior, as far as I know. Perhaps your
organization has some documentation to refer to?
Sadly, my Windows knowledge is pretty poor; I might be missing something.
I have permission to update the cookbook but this error is coming even
listing the nodes.
C:\Users\dharmesh.patel\chef-repo\chef-repo\trunk>knife node list
ERROR: You have an error in your config file
C:/Users/dharmesh.patel/chef-repo/c
hef-repo/trunk/.chef/knife.rb
TypeError: can't convert nil into String
C:/Users/dharmesh.patel/chef-repo/chef-repo/trunk/.chef/knife.rb:3:in initial ize' C:/Users/dharmesh.patel/chef-repo/chef-repo/trunk/.chef/knife.rb:3:in open'
C:/Users/dharmesh.patel/chef-repo/chef-repo/trunk/.chef/knife.rb:3:in
`from_st
ring'
Environment variable was messed up in my windows machine. I did fixed this
issue. It is working as expected.
On Wed, Dec 24, 2014 at 12:12 PM, Matthew Moretti werebus@gmail.com wrote:
It looks like the author of your knife.rb file expected the environment
variable, “CHEF_CONFIG“, to exist and it doesn’t. That is,
ENV["CHEF_CONFIG"] is returning nil which in turn can’t be used as a file
name to open.
I’m guessing here, but it looks like the intention was for that
environment variable to contain the path to a YAML file that has some
configuration in it? This isn’t a default behavior, as far as I know.
Perhaps your organization has some documentation to refer to?
Sadly, my Windows knowledge is pretty poor; I might be missing something.
I have permission to update the cookbook but this error is coming even
listing the nodes.
C:\Users\dharmesh.patel\chef-repo\chef-repo\trunk>knife node list
ERROR: You have an error in your config file
C:/Users/dharmesh.patel/chef-repo/c
hef-repo/trunk/.chef/knife.rb
TypeError: can't convert nil into String
C:/Users/dharmesh.patel/chef-repo/chef-repo/trunk/.chef/knife.rb:3:in initial ize' C:/Users/dharmesh.patel/chef-repo/chef-repo/trunk/.chef/knife.rb:3:in open'
C:/Users/dharmesh.patel/chef-repo/chef-repo/trunk/.chef/knife.rb:3:in
`from_st
ring'