Extended script for gem installation