TypeError: can't convert Array into String - ruby 1.9.2
Hey all, I’m trying to setup a server with ruby 1.9.2 instead of the default chef version. I’ve got the bootstrap file in chef-repo/boostrap/ubuntu10.04_ruby192.erb.
When I try and run this command, it fails. Anyone have any idea what I’m doing wrong?
bash-3.2$ knife bootstrap ec2-50-16-81-106.compute-1.amazonaws.com -x ubuntu --distro ubuntu10.04-ruby192 Bootstrapping Chef on ec2-50-16-81-106.compute-1.amazonaws.com ERROR: TypeError: can't convert Array into String
In version of Chef 0.10.x prior to version 0.10.6, this is the error you receive if knife can’t find the bootstrap file you specified. I have seen this error caused by two related situations:
Simply mispelled or missing bootstraps. Note that in the example in tis question, the bootstrap is ubuntu10.04-ruby192 but that the file is ubuntu10.04_ruby192.erb. The “–” should be a “_”
As ahawthorne mentioned, not running the knife bootstrap command from the top of your Chef repository. Prior to 0.10.6, knife-bootstrap naively looked for custom bootstraps in the relative path “.chef/bootstrap/”.
The second issue is fixed in 0.10.6 and a more informative error message should be seen in the case of the first issue as well.
I was not clear in my last post. Apologies for “required directory”.
For example, with a directory structure like what is shown on https://github.com/jtimberman/chef-repo/ you need to run knife bootstrap (and possibly other knife commands) from /home/user/opscode/
I hope that clarifies a bit.