I am a fresh Ruby convert (from a C++, Java & Python etc. background), armed
with a copy of “Programming Ruby” and burgeoning enthusiasm!
Maybe you will permit me a true newbie question: “How do I uninstall a previous
version of Ruby”?
I had previously downloaded ruby-1.6.8.tar.gz to my GNU/Linux machine, and done
the usual “./configure”, “make”, “make install” dance. Everything worked fine
and I was the happy owner of a shiny and stable Ruby installation.
Now I am getting (too?) adventurous already, and decide to fetch and build Ruby
from CVS.
So to be on the safe side, I want to uninstall the previous Ruby distribution.
Usually this would be acomplished by typing “make uninstall”. However, there is
no “uninstall” target in the makefile. I tried Google-ing for the answer and
found a couple of posts from other people making the same observation, but no
solution.
Maybe you will permit me a true newbie question: “How do I uninstall a previous
version of Ruby”?
If you want to get rid of everything, remove /usr/local/lib/ruby,
/usr/local/bin/ruby, and /usr/local/bin/irb. That should do it. Of course,
that will also remove all additional modules you’ve added.
Jim
···
–
Jim Menard, jimm@io.com, http://www.io.com/~jimm/
“Lead me not into temptation. I can find it myself.”
– Jeffrey Kaplan’s .sig, seen in rec.humor.oracle.d
At Thu, 13 Mar 2003 03:26:08 +0900, Colin Coates wrote:
So to be on the safe side, I want to uninstall the previous Ruby distribution.
Usually this would be acomplished by typing “make uninstall”. However, there is
no “uninstall” target in the makefile. I tried Google-ing for the answer and
found a couple of posts from other people making the same observation, but no
solution.
1.6 and 1.8 can coexist except for $(prefix)/bin/{ruby,irb}
(although irb in 1.6 and 18 are actually identical now). So
you don’t need to uninstall the previous version, if you rename
them.
When you want to uninstall ruby, remove $(prefix)/bin stuff as
above, $(prefix)/lib/libruby.* and $(prefix)/lib/ruby/.
If you tend to build your own files a lot, and your OS doesn’t take care
of things for you (e.g. Gentoo and FreeBSD), look into XStow or Stow
(check on Freshmeat.net). These, with a little help from you, keep your
locally compiled packages in a neat hierarchy in /usr/local/stow, and
symlink the relevant files back into the /usr/local hierarchy. It allows
you to easily uninstall as well.
A drawback is that you then have to remember to re-stow Ruby whenever you
add a new module, but I think it is worth it to have the ability to track
everything.
You won’t find a lot of ‘uninstall’ targets for Make, I’m afraid. It’s
generally risky to do, and probably not the job for the programmer of the
application. That’s just the way Unix tends to be.
–Gabriel
···
On Thu, 13 Mar 2003 03:26:08 +0900, Colin Coates wrote:
I had previously downloaded ruby-1.6.8.tar.gz to my GNU/Linux machine, and
done the usual “./configure”, “make”, “make install” dance. Everything
worked fine and I was the happy owner of a shiny and stable Ruby
installation.
Now I am getting (too?) adventurous already, and decide to fetch and build
Ruby from CVS.
Thanks very much for all your polite & helpful suggestions, I guess “Pickaxe” is
entirely accurate in reporting how helpful the Ruby community is!
I am currently evaluating stow & encap, I did not know either existed before
their use was suggested on this list!
After thinking further on the topic, I realised that automatic “uninstall” can
be tricky option to support for all the various flavours of *NIX. Nevertheless,
I like Ethan’s suggestion of adding a “generate uninstall make target” into the
automake script for Ruby; Maybe one of the Ruby comitters could consider doing
this?
Anyway, thanks again for your help along the Ruby way;-)
If you want to get rid of everything, remove /usr/local/lib/ruby,
/usr/local/bin/ruby, and /usr/local/bin/irb. That should do it. Of course,
that will also remove all additional modules you’ve added.
Thanks for your rapid response Jim!
Obviously, this is a trivial manual task, once you know what to do!
I am still a bit surprised about the lack of an “uninstall” target in make;
since this question has been raised by (at least two) other newbies, please will
one of the Ruby commiters consider adding it? Failing that, maybe it is worth
adding to the Ruby FAQ, maybe in the install section?
Most applications that use automake actually have an uninstall … as
automake takes care of writing uninstall rules that work (most of the
time, heh) for you.
Ethan
···
On Fri, 14 Mar 2003 03:22:38 GMT, Gabriel Emerson wrote:
You won’t find a lot of ‘uninstall’ targets for Make, I’m afraid. It’s
generally risky to do, and probably not the job for the programmer of the
application. That’s just the way Unix tends to be.
The Ruby community is the best community you will find anywhere on the
net. You can ask the toughest questions, smear the language, even
make fun of somebody’s mother, and the community will respond
positively.
# from edward wilson
I am still a bit surprised about the lack of an “uninstall” target in make;
since this question has been raised by (at least two) other newbies, please will
one of the Ruby commiters consider adding it? Failing that, maybe it is worth
adding to the Ruby FAQ, maybe in the install section?
Use GNU stow (available from your friendly neighbourhood gnu archive).
basically, do
cd widget-0.1
./configure
make
make install PREFIX=/usr/local/stow/widget0.1
it gets copied into the stow directory.
then cd to /usr/local/stow, and do stow widget0.1
what happens is symlinks get built in /usr/local to point into
the stow directory. It’s a one-line to uninstall. Doing a ls -l will
tell you what package a file came from. Beautiful.
I haven’t tried it with ruby install.rb --prefix= but I will. I like to
keep track of where things on my system come from.
Cheers,
Sam
Quoteing eblanton@cs.purdue.edu, on Fri, Mar 14, 2003 at 02:00:17PM +0900:
···
On Fri, 14 Mar 2003 03:22:38 GMT, Gabriel Emerson wrote:
You won’t find a lot of ‘uninstall’ targets for Make, I’m afraid. It’s
generally risky to do, and probably not the job for the programmer of the
application. That’s just the way Unix tends to be.
Most applications that use automake actually have an uninstall … as
automake takes care of writing uninstall rules that work (most of the
time, heh) for you.
> I haven't tried it with ruby install.rb --prefix= but I will. I like to
> keep track of where things on my system come from.
You might also check out epkg (http://www.encap.org/), which is like
GNU stow, but more sophisticated (yet just as simple to use ;). You
can use it like stow (I do), or do all-out packages with dependencies
and the like, very simple to build. (Nice if you build something and
want to put it on other boxes.) I haven’t seen the latest stow, but
last I saw, epkg was considerably faster. It also supposedly has
facilities for automatically building things from autoconf-enabled
source tarballs.
I use epkg for ruby stuff, although I haven’t --prefix='d things
(being generally tied to the given ruby version), it should work
either way.
Stow or epkg, though, I’ll put in my 2-cent recommendation for doing
things this way… finally you can manage source like you manage
binary packages.
Thanks very much for all your polite & helpful suggestions, I guess
“Pickaxe” is
entirely accurate in reporting how helpful the Ruby community is!
The Ruby community is the best community you will find anywhere on the
net. You can ask the toughest questions, smear the language, even
make fun of somebody’s mother, and the community will respond
positively.
# from edward wilson
Hey, not my mother. She’s sacred.
Hal
···
----- Original Message -----
From: “gabriele renzi” surrender_it@rc1.vip.lng.yahoo.com
Newsgroups: comp.lang.ruby
To: “ruby-talk ML” ruby-talk@ruby-lang.org
Sent: Friday, March 14, 2003 2:42 PM
Subject: Re: Ruby newbie uninstall question?