I also encountered a similar (but different) problem with my web host when using Composer to install the Sematic extension for my Mediawiki installation. I was not using Cafinony but using using Putty and SSH to run Composer on a "remote' command line. Composer failed with the same error;
The Process class relies on proc_open, which is not available on your PHP installation.
However, I was able to fix it another way.
proc_open is a PHP function that is typically "disabled' by most web hosts. It is disabled by including the function in the list of disabled functions which are set with the PHP configuration setting, disable_functions. In other words, if it is included in the list it is disabled; if it is removed from the list it is enabled.
You can therefore effectively enable proc_open "on the fly" by using the php command line -d option to remove the disabled functions (which includes proc_open). In other words, by removing the list of disable_functions you effectively "enable all" functions, including proc _pen.
To use -d to enable proc_open, you must set the disable_functions setting to an empty string. This will remove all the list of disabled functions (including proc_open)
When installing at the command line using an SSH client such as Putty, use a command similar to this:
php -f composer.phar -d detect_unicode=Off -d disable_functions= require mediawiki/semantic-media-wiki "1.9.*,>=1.9.0.1"
So, if you can figure out a way to pass "-d settings" with your ruby file, you may be able to solve your problem.
I know this does not fully address your problem, but it may help others with overcoming annoying default php settings on shared servers, that get in the way of Composer!
I hope this helps someone.