You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I tried to build a VMware box, with ruby 2.0, and got the above exception.
I suspect the problem is due to non-ASCII characters (the copyright symbol (c) for one) in the output of ``system_profiler SPApplicationsDataType'', combined with changes to the default encoding of streams in ruby 1.9+.
... but then it breaks on 1.8, because there is no Encoding module. If I had more ruby-fu, I'd find a way to test, at runtime, for the presence of the Encoding module, and only pass that :external_encoding option if it were present.
The text was updated successfully, but these errors were encountered:
I tried to build a VMware box, with ruby 2.0, and got the above exception.
I suspect the problem is due to non-ASCII characters (the copyright symbol (c) for one) in the output of ``system_profiler SPApplicationsDataType'', combined with changes to the default encoding of streams in ruby 1.9+.
This little snippet demonstrates the problem:
/usr/bin/ruby (i.e., ruby 1.8) runs this with no problem, but ruby 1.9 and 2.0 die with the exception.
Changing the script allows it to run on the newer rubies:
... but then it breaks on 1.8, because there is no Encoding module. If I had more ruby-fu, I'd find a way to test, at runtime, for the presence of the Encoding module, and only pass that :external_encoding option if it were present.
The text was updated successfully, but these errors were encountered: