try to fix rubygems instalation issues, update 1da8572
make sure the shell check works also in cygwin, fix #2631