Find out source of installed gem
This is probably simple, but I'm stumped...
So I've got a gem that needs a fix already installed on a shared development machine. How do I tell where it came from, so I can fork it?
Just to eliminate some obvious things, it definitely is installed:
$ be gem list spp_manifests *** LOCAL GEMS *** spp_manifests (0.0.4)
Checking the gemspec reveals nothing of use (except the author's name, but he's away):
$ gem specification spp_manifests name: spp_manifests homepage: "" rubyforge_project:
But it's not public in Github, it's not in our company Github repo, it's not in Rubygems and googling for the name produces lots of links to the Singapore People's Party election manifestos but nothing of use.
So short answer is, once gemmed up, the code is completely split off from the repo it once lived in and there's no way to find out the address of that original repo.
However, it is possible to:
a) unpack the gem's code, so you can create a new repo for it (credit to Flambino)
gem unpack spp_manifests
b) find out where the gem was downloaded from (credit to Stefan)
more Gemfile.lock GEM remote: http://gems.megacorp.com/ remote: http://rubygems.org/
I can't test this out now since i use a proxy but you could do a gem update spp_manifest while in a console window on the same machine you issue a "netstat -b 1" (or the nix counterpart) to list all your connections. Your machine schould make a connection to the source and do an install if a more recent version is found. In the list of connections you should see the source.
You can also chek with "gem environment" the remote sources or a remote lookup wih "gem query -r -n spp_manifests"