There are literally no other options?
Developing in `Program Files` can be extremely hard. If you have security concerns it may be impossible to run/develop in `Program Files`.
RUBYOPT is an environment variable that you can set to cause every invocation of `ruby` to be started with those options. In this case, it's probably the space in `Program Files` that is causing your problems. The space in the directory is causing the latter part of the directory, starting with "Files", to be parsed as a separate entity. Which is why you're getting the illegal switch of `F`. I don't know if this is actually fixable.
All of that aside, `Program Files` is designed to be extremely "Read-Only". Most importantly "CREATOR OWNER" doesn't have any access to the folders in `Program Files`, so writing temporary files of any kind will require full elevation. I would never suggest this because of the security implications.
Sorry if I wasn't helpful; likewise I don't know I can help you. It may be helpful to know more about the environment though. Especially things like "Which version of Windows?"
Justin