The following command (and variations of it) run okay in terminal in mac, run okay in a ruby program executed on a mac, run okay directly in the windows command prompt, but fail with a parsing error when I try to run it inside of a ruby file on windows.
curl -u"user:pwd" -d"{\"name\":\"new_repo_beepo\"}" https://api.github.com/user/repos --insecure
I've tried executing it with backticks, %x() and system. I've also tried substitution of strings and json'ing pieces of it, without any luck. From what I can determine, the failure point is in the -d"{\"name\":\"repo_name\"}" section, but that's only from trying the command without it. Regardless, in each variation of the command on windows in ruby, I get a JSON parsing error.
system, eg:system('curl','-u"user:pwd"', '-d...', ...)? On posix that will send the arg vector as specified directly to the exec'ed program without letting the shell get in the way.