Changing icons on Mac and PC

Be wary of copying code when it is not properly wrapped in the forum (as you did above.)
The forum replaces double quotes with smartquotes, which Ruby cannot understand.

Also in your code snippet you have both a local reference (cmd) and an instance reference (@cmd.)

Other than these, you’ll need to quote the error message.