Check for gem before installing.