private String findPathToGems ( ) throws FileNotFoundException { String [ ] commandParams = cli . getCommandParams ( GEM , ENVIRONMENT ) ; List < String > lines = cli . runCmd ( rootDirectory , commandParams ) ; String path = null ; if ( ! lines . isEmpty ( ) ) { path = lines . get ( 0 ) + fileSeparator + CACHE ; if ( new File ( path ) . isDirectory ( ) == false ) { throw new FileNotFoundException ( ) ; } } return path ; }
Ruby s cache is inside the installation folder . path can be found by running command gem environment gemdir