With “$(gem env gemdir)”, users reported that the gem was installed in their home directory and not the default gem directory. This fixes that by using the default gem installation directory instead.