Forum: Ruby Does 'gem list' go by .gemspec only?

Posted by Ron Lipke (rlipke)
on 2013-02-26 19:53
Hello, Ruby beginner here trying to learn as much as I can.

Does `gem list` use the GEM_PATH to find the actual install folders or
does it just look for the .gemspec files?

I've noticed if I delete a gem's install folder manually and run `gem
list`, it will still show up in the list, but trying to use the gem in
anyway (including `gem uninstall`) returns an error until I delete the
associated .gemspec file as well.  After that, the gem will no longer
show up in `gem list`.

Thanks in advance for any clarification.
Posted by Ryan Davis (Guest)
on 2013-02-26 20:10
(Received via mailing list)
Iirc it uses the spec files in gem_path/specifications.

Why manually delete?
Posted by Ron Lipke (rlipke)
on 2013-02-26 20:13
I jacked up some rvm gemsets and was just kicking the tires to get a 
better handle on how ruby-gems, gemsets and bundler interact with each 
other in the context of rvm.

Now I'm curious as to why it looks for the .gemspec and not the wrapper.
Posted by Ryan Davis (Guest)
on 2013-02-26 20:22
(Received via mailing list)
Because the gemspec knows everything there is to know about the gem.
Please log in before posting. Registration is free and takes only a minute.
Existing account (Switch to SSL-encrypted connection)
NEW: Do you have a Google/GoogleMail or Yahoo account? No registration required!
Log in with Google account | Log in with Yahoo account
No account? Register here.