Can't install older version of Rake Gem in Rails

I have rake version 0.9.2 installed, and I think I need to install 0.8.7 to solve some problems. However, after installing 0.8.7, 0.9.2 is still installed. Here is what I ran:

rake --version 

rake version 0.9.2

 gem install rake -v 0.8.7 

Successfully installed rake-0.8.7. 1 stone installed. Installing ri-documentation for rake-0.8.7 ... Installing RDoc documentation for rake-0.8.7 ...

Then I added this to my Gemfile:

 gem 'rake', '0.8.7' 

But 0.9.2 is still being called:

 rake --version 

rake version 0.9.2

How to fix it?

+4
source share
2 answers

Run this command in bash:

 gem uninstall rake 

You will then be asked which version you want to remove. You select 0.9.2 and then run

 bundle update rake 

That should do it for you ...

+2
source

I had a similar problem (reverting to an older version of the rake in the Gemfile meant that I got "You requested: rake = 10.3.2 ... Currently, the packet is reset with error 10.4.2."). If "fixed" by deleting the Gemfile.lock file and the running package, follow these steps:

 rm Gemfile.lock bundle 

Now rake --version produces "rake version 10.3.2"

This is an alternative to running bundle update rake .

0
source

All Articles