How do I downgrade to an old version of compass using gem install?

RubygemsSassCompass Sass

Rubygems Problem Overview


I've been using compass from http://compass-style.org/ to manage my sites css for a long time. I just installed the newest version and I get a rather unpleasant error, that has as a side effect corrupted all my css files. How do I downgrade to an older version of this?

Thanks, Matt

Rubygems Solutions


Solution 1 - Rubygems

I just had a similar situation and there is something else missing from @corroded answer. Since @Matt Lynn is downgrading, he needs to uninstall the existing version of compass.

$ sudo gem uninstall compass

$ sudo gem install compass --version versionnumber

Otherwise you will end up with two different versions of compass.

Solution 2 - Rubygems

sudo gem install compass --version versionnumber

Solution 3 - Rubygems

If you want to automate it in a script (I had the same problem after a gem update), just do the following:

  1. Install your favored version (if you don't have already)

    gem install compass -v 1.2.3

  2. Uninstall newer versions

    gem uninstall compass -v '>1.2.3' --force

Solution 4 - Rubygems

A Gem update doesn't 'update' the gem, but it installs a newer version of it.

So you to uninstall the newer version and leave behind the older.

Eg, for me, I wanted to revert back to an older version of selenium-webdriver, this is what I did:

- gem uninstall selenium-webdriver

This gave me an option to select gem to uninstall, with the following options:

    1. selenium-webdriver-3.4.3
    2. selenium-webdriver-3.8.0
    3. All versions

I entered 2 and the latest version was unistalled, leaving my system with the desired older version.

To install a particular version that doesn't exist in your system, just select 3 to uninstall all versions and install the specific version with:

gem install selenium-webdriver -v 3.5.3

Replace selenium-webdriver with your gem name and 3.5.3 with the version you want.

Hope this helps somebody!

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionMatt LynnView Question on Stackoverflow
Solution 1 - RubygemsJasperoView Answer on Stackoverflow
Solution 2 - RubygemscorrodedView Answer on Stackoverflow
Solution 3 - RubygemsKevinHView Answer on Stackoverflow
Solution 4 - RubygemsKaka RutoView Answer on Stackoverflow