raise if gem or version is incorrect