Found an easier way: the -i option for gem install creates a new repository. Just install a gem into an empty directory, and it creates a new repository (for example: gem install rake -i new_repository) . Just point GEM_HOME and/or GEM_PATH to the new repository, add the bin subdirectory to your PATH, and you're good to go.