Search code examples
ruby-on-railsrubygemsrake

Cannot 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 gem installed Installing ri documentation for rake-0.8.7... Installing RDoc documentation for rake-0.8.7...

I then added this to my Gemfile:

gem 'rake', '0.8.7'

But 0.9.2 is still called:

rake --version

rake, version 0.9.2

How do I fix this?


Solution

  • Run this command on the bash:

    gem uninstall rake
    

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

    bundle update rake
    

    This should do it for you...