Hello!
I'd like to know if there is any gentle way to uninstall all gems excepted the latest versions and their depencency.
Thanks in advance
Hello!
I'd like to know if there is any gentle way to uninstall all gems excepted the latest versions and their depencency.
Thanks in advance
Hello!
Hi!
I'd like to know if there is any gentle way to uninstall all gems excepted the
latest versions and their depencency.Thanks in advance
$ gem cleanup
You'll need a fairly recent version of RubyGems. This was added
within the past couple of months.
On 4/21/05, Lionel Thiry <lthiryidontwantspam@skynetnospam.be> wrote:
--
Chad Fowler
http://chadfowler.com
http://rubygems.rubyforge.org (over 300,000 gems served!)
Chad Fowler wrote:
Hello!
Hi!
I'd like to know if there is any gentle way to uninstall all gems excepted the
latest versions and their depencency.Thanks in advance
$ gem cleanup
You'll need a fairly recent version of RubyGems. This was added
within the past couple of months.
Ah. Nice. SO I go and try it out, and mistype the command.
Yet it runs:
c:\>gem cl;eanup
Cleaning up installed gems...
Clean Up Complete
I see that one can abbreviate this, and I guess the trailing characters were enough to stop it from actually running, because I then tried this:
c:\>gem cl
Cleaning up installed gems...
Attempting uninstall on rails-0.11.1
Attempting to uninstall gem 'rails'
Successfully uninstalled rails version 0.11.1
Attempting uninstall on mechanize-0.1.0
Attempting to uninstall gem 'mechanize'
Successfully uninstalled mechanize version 0.1.0
Attempting uninstall on nitro-0.14.0
Attempting to uninstall gem 'nitro'
Successfully uninstalled nitro version 0.14.0
Attempting uninstall on madeleine-0.6.1
Attempting to uninstall gem 'madeleine'
Successfully uninstalled madeleine version 0.6.1
Attempting uninstall on htmltools-1.0.8
Attempting to uninstall gem 'htmltools'
...
Wondering if 'cl' was a formal abbreviation for 'cleanup', I ran
C:\Temp>gem help cl
Usage: gem cleanup [options]
Options:
-d, --dryrun
...
But this works, too:
C:\Temp>gem help cle
Usage: gem cleanup [options]
Options:
-d, --dryrun
...
Does this willingness to interpret partial commands pose a risk if the command is destructive? It is unlikely I would accidentally type "gem cleanup", but "gem cl" seems plausible.
Might it be better to require complete command names on destructive operations?
James
On 4/21/05, Lionel Thiry <lthiryidontwantspam@skynetnospam.be> wrote:
Chad Fowler a écrit :
Hello!
Hi!
I'd like to know if there is any gentle way to uninstall all gems excepted the
latest versions and their depencency.Thanks in advance
$ gem cleanup
You'll need a fairly recent version of RubyGems. This was added
within the past couple of months.
Thanks!
But I had some warnings:
---8<---
Attempting uninstall on rubyzip-0.5.5
Attempting to uninstall gem 'rubyzip'
You have requested to uninstall the gem:
rubyzip-0.5.5
instiki-0.10.0 depends on [rubyzip (= 0.5.5)]
instiki-0.9.2 depends on [rubyzip (= 0.5.5)]
If you remove this gems, one or more dependencies will not be met.
Continue with Uninstall? [Yn]
Successfully uninstalled rubyzip version 0.5.5
---8<---
and
---8<---
Attempting uninstall on rails-0.11.1
Attempting to uninstall gem 'rails'
You have requested to uninstall the gem:
rails-0.11.1
instiki-0.10.0 depends on [rails (= 0.11.1)]
If you remove this gems, one or more dependencies will not be met.
Continue with Uninstall? [Yn]
---8<---
I've said yes to both, but I don't know if it is a mistake or not. Can you tell me more about this?
On 4/21/05, Lionel Thiry <lthiryidontwantspam@skynetnospam.be> wrote:
--
Lionel Thiry
Personal website: http://users.skynet.be/lthiry/
Chad Fowler a écrit :
Hello!
Hi!
I'd like to know if there is any gentle way to uninstall all gems excepted the
latest versions and their depencency.Thanks in advance
$ gem cleanup
You'll need a fairly recent version of RubyGems. This was added
within the past couple of months.
Thanks a lot!
I had some warnings:
---8<---
Attempting uninstall on rubyzip-0.5.5
Attempting to uninstall gem 'rubyzip'
You have requested to uninstall the gem:
rubyzip-0.5.5
instiki-0.10.0 depends on [rubyzip (= 0.5.5)]
instiki-0.9.2 depends on [rubyzip (= 0.5.5)]
If you remove this gems, one or more dependencies will not be met.
Continue with Uninstall? [Yn]
---8<---
and
---8<---
Attempting uninstall on rails-0.11.1
Attempting to uninstall gem 'rails'
You have requested to uninstall the gem:
rails-0.11.1
instiki-0.10.0 depends on [rails (= 0.11.1)]
If you remove this gems, one or more dependencies will not be met.
Continue with Uninstall? [Yn]
---8<---
I've said yes to both but I have no idea if it was the thing to do.
PS: my first post didn't succeed, this is a retry, there may be a double posting
On 4/21/05, Lionel Thiry <lthiryidontwantspam@skynetnospam.be> wrote:
--
Lionel Thiry
Personal website: http://users.skynet.be/lthiry/
Your version of instiki requires version 0.11.1 of rails. You presumably have
version 0.11.1 and a later version installed. The cleanup command wants to
remove 0.11.1 (since you have a later version), but the instiki program
cannot use the later version (because it explicitly says = 0.11.1). Removing
rails 0.11.1 will probably cause instiki to fail.
On Thursday 21 April 2005 05:14 pm, Lionel Thiry wrote:
---8<---
You have requested to uninstall the gem:
rails-0.11.1
instiki-0.10.0 depends on [rails (= 0.11.1)]
If you remove this gems, one or more dependencies will not be met.
Continue with Uninstall? [Yn]
---8<---I've said yes to both but I have no idea if it was the thing to do.
--
-- Jim Weirich jim@weirichhouse.org http://onestepback.org
-----------------------------------------------------------------
"Beware of bugs in the above code; I have only proved it correct,
not tried it." -- Donald Knuth (in a memo to Peter van Emde Boas)
Jim Weirich a écrit :
---8<---
You have requested to uninstall the gem:
rails-0.11.1
instiki-0.10.0 depends on [rails (= 0.11.1)]
If you remove this gems, one or more dependencies will not be met.
Continue with Uninstall? [Yn]
---8<---I've said yes to both but I have no idea if it was the thing to do.
Your version of instiki requires version 0.11.1 of rails. You presumably have version 0.11.1 and a later version installed. The cleanup command wants to remove 0.11.1 (since you have a later version), but the instiki program cannot use the later version (because it explicitly says = 0.11.1). Removing rails 0.11.1 will probably cause instiki to fail.
Mmm, so I made a mistake.
But well, shouldn't the "n" anwser be the default? Who wants to break dependencies? I personnaly didn't want it.
And is it really necessary to ask such a question? I mean, if one really wants to remove a gem, action which could break depencies, wouldn't it be better for him to explicitly force it? With something like:
gem unsinstall --force the_gem_I_really_want_to_remove
No? What do you think about it?
On Thursday 21 April 2005 05:14 pm, Lionel Thiry wrote:
--
Lionel Thiry
Personal website: http://users.skynet.be/lthiry/