how to determine where a gem's files are installed

1,286 views
Skip to first unread message

Brian Sammon

unread,
Jul 21, 2007, 8:56:02 PM7/21/07
to rub...@googlegroups.com
How do I determine where a gem's files are installed?

"gem spec" gives relative paths, and I can't figure out what they're relative
to.
"gem contents" says the package can't be found, even though "gem list" shows
it.

I'm not entirely sure what to expect from "gem spec" and "gem contents".

If it's relevant, I'm running Debian Linux.


Joseph Method

unread,
Jul 21, 2007, 11:36:03 PM7/21/07
to rub...@googlegroups.com
They're here: /usr/lib/ruby/gems/1.8/gems


--
-J. Method

Brian Sammon

unread,
Jul 22, 2007, 1:59:11 PM7/22/07
to rub...@googlegroups.com
> How do I determine where a gem's files are installed?
>
> "gem spec" gives relative paths, and I can't figure out what they're relative
> to.

I've discovered that "gem environment" answers this question. It tells you
the base path that gems are installed to.

Further wonderings:
Does rubygems have an installed-package database like RPM?
If you use the "--install-dir" argument to the "gem install" command to
install a gem in a non-standard place, does rubygems keep track of the
nonstandard location so it knows how to uninstall it?


Andrew Chen

unread,
Jul 22, 2007, 10:56:25 PM7/22/07
to rub...@googlegroups.com
gem list --local

will tell you what gems are installed.

To uninstall, I would just delete gems from the installed directory (?)

~Andrew Chen

Reply all
Reply to author
Forward
0 new messages