"gem uninstall rspec" doesn't remove bin/rspec + bin/rspec.bat on Windows
$ ruby -v
ruby 1.8.7 (2010-12-23 patchlevel 330) [i386-mingw32]
$ rspec
The term 'rspec' is not recognized as the name of a cmdlet...
$ gem install rspec
Successfully installed rspec-2.4.0
...
$ rspec -v
2.4.0
$ gem uninstall rspec
You have requested to uninstall the gem:
rspec-2.4.0
thor-0.14.6 depends on [rspec (~> 2.1)]
bundler-1.0.9 depends on [rspec (>= 0)]
If you remove this gems, one or more dependencies will not be met.
Continue with Uninstall? [Yn] y
Successfully uninstalled rspec-2.4.0
$ rspec -v
2.4.0
On OS/X, uninstalling the gem will uninstall the bins for that gem too. On Windows, they seem to be retained.
Comments are currently closed for this discussion. You can start a new one.
Support Staff 2 Posted by Luis Lavena on 30 Jan, 2011 07:25 PM
"rspec" binary is inside rspec-core gem, not rspec:
C:\Users\Luis>ruby -v
ruby 1.8.7 (2010-12-23 patchlevel 330) [i386-mingw32]
C:\Users\Luis>gem list
*** LOCAL GEMS ***
C:\Users\Luis>gem install rspec
Fetching: rspec-core-2.4.0.gem (100%)
**************************************************
Thank you for installing rspec-core-2.4.0
Please be sure to look at the upgrade instructions to see what might have
changed since the last release:
http://github.com/rspec/rspec-core/blob/master/Upgrade.markdown
**************************************************
Fetching: diff-lcs-1.1.2.gem (100%)
Fetching: rspec-expectations-2.4.0.gem (100%)
Fetching: rspec-mocks-2.4.0.gem (100%)
Fetching: rspec-2.4.0.gem (100%)
Successfully installed rspec-core-2.4.0
Successfully installed diff-lcs-1.1.2
Successfully installed rspec-expectations-2.4.0
Successfully installed rspec-mocks-2.4.0
Successfully installed rspec-2.4.0
5 gems installed
C:\Users\Luis>rspec --version
2.4.0
C:\Users\Luis>where rspec
C:\Users\Luis\.gem\ruby\x86-mingw32\1.8\bin\rspec
C:\Users\Luis\.gem\ruby\x86-mingw32\1.8\bin\rspec.bat
C:\Users\Luis>gem uninstall rspec
Successfully uninstalled rspec-2.4.0
C:\Users\Luis>where rspec
C:\Users\Luis\.gem\ruby\x86-mingw32\1.8\bin\rspec
C:\Users\Luis\.gem\ruby\x86-mingw32\1.8\bin\rspec.bat
C:\Users\Luis>gem uninstall rspec-core
Remove executables:
autospec, rspec
in addition to the gem? [Yn]
Removing autospec
Removing rspec
Successfully uninstalled rspec-core-2.4.0
Also, help.rubygems.org is aimed at support of rubygems.org, not
reporting bugs of RubyGems itself.
For that, you have RubyGems tracker:
http://rubyforge.org/projects/rubygems
Luis Lavena closed this discussion on 30 Jan, 2011 07:26 PM.
drnicwilliams re-opened this discussion on 30 Jan, 2011 07:27 PM
3 Posted by drnicwilliams on 30 Jan, 2011 07:27 PM
Thanks for the link to the bug tracker - I couldn't figure out what the URL was from the repo README. It only mentions help.
I guess this is a big in railsinstaller instead?
Support Staff 4 Posted by Luis Lavena on 30 Jan, 2011 07:32 PM
There is a bug report for that :-P
http://rubyforge.org/tracker/index.php?func=detail&aid=28825&group_id=126&atid=575
The error you're seeing depend on where the gem was installed, if was
installed in user install directory or inside the Ruby version, once
you remove the gem will have this side effect of leaving the binaries.
But as I showed to you, the binaries are inside rspec-core gem, not
rspec, so removing rspec will not remove the binaries.
Dunno if RVM was not interfering in your OSX testing, but if you show
me the exact "gem env" information for both systems I can better
reproduce the issue (if there is any).
5 Posted by drnicwilliams on 30 Jan, 2011 07:43 PM
Ahh, is that what you showed me. Sorry, I didn't see that in your demo. I
just thought you were showing me that it worked on your machine.
Sorry, I didn't know the rspec bin wasn't in the rspec gem. Doh. Sorry.
Nic
On Sun, Jan 30, 2011 at 11:32 AM, Luis Lavena <
[email blocked]<tender%[email blocked]>
> wrote:
Support Staff 6 Posted by Luis Lavena on 23 May, 2011 09:34 PM
Hello, this issue seems to be clarified, closing this out.
Luis Lavena closed this discussion on 23 May, 2011 09:34 PM.