Can't remove rake 0.9 on racks 2.3.8

I am working on an old Rails 2.3.8 project and setting up a dev server.

I get errors when I try to run rake

and I realized that I had the wrong version of Rake installed, the Rakefile says:

s.add_dependency 'rake', '>= 0.7.1'

      

and I have 0.9.2.2 installed. When I try to delete, I get

ERROR: While executing gem ... (Gem :: InstallError) fails to remove, check gem list -d rake

I don't have RVM and all the posts I see are related to fixing this issue mentioned by RVM, so I am stuck.

+3


source to share


1 answer


I ran into this error myself. I don't know why this happened, but I figured out how to fix it.

It is giving error because it got a gemspec entry without an actual gem in the gem directory.

You can fix this by manually deleting the gemspec in your gems folder.

First you need to figure out where the stone is. You can do it with:

 echo $GEM_PATH

      



If you are on * nix you can also try /usr/lib/ruby/gems/

Otherwise google will figure out how to find your directoy gem.

the gem directory has subdirectories, the ones I found appropriate to fix were: gems

specifications

andcache

Are you looking for something like rake-0.9.2.2

If the stone was found in gems

, then it would have been removed for me, but it is not. However, I found rake-0.9.2.2.gemspec

in specifications

and rake-0.9.2.2.gem

in cache

. When I removed both of them, I stopped getting the error.

+1


source







All Articles