speed up checking if required gems are installed, update #2747