opscode/chef — pull request #2439 by Daegalus (2014-11-18 00:27:50+00:00)
Title: Fix installer_version_string to be an array on prerelease parameter.

I hit this problem when I was trying to provision some new servers with Chef 12. Whenever I used --prerelease or knife[:prerelease] I would get the following:

```
>> knife bootstrap chef-network -x ubuntu -N chef-network --sudo
Connecting to chef-network
ERROR: knife encountered an unexpected error
This may be a bug in the 'bootstrap' knife command or plugin
Please collect the output of this command with the `-VV` option before filing a bug report.
Exception: NoMethodError: undefined method `join' for "-p":String
```

I was not too familiar with the code, but after some digging, and editing files. I realized the simple fix. When prerelease is set, you set the installer_version_string to a string, but then after the if/else you try to join it. Since its not an array, it fails. I changed it to an array, much like how you have it in the else block for other things.

After making the change, everything works.

Its a super simple fix, but I wasn't sure if this was an "obvious fix" so I didn't mark it as such.