updated build script for new ruby versions