如何使用 gem install 降级到旧版本的 compass?
我一直在使用 http://compass-style.org/ 中的指南针来管理我的网站 css很久。我刚刚安装了最新版本,但出现了一个相当令人不快的错误,它的副作用是损坏了我所有的 css 文件。如何降级到旧版本?
谢谢, 马特
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
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
我刚刚遇到了类似的情况,@corroded 答案中还缺少其他内容。由于@Matt Lynn 正在降级,他需要卸载现有版本的compass。
否则你最终会得到两个不同版本的指南针。
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.
Otherwise you will end up with two different versions of compass.
如果您想在脚本中自动执行它(我在
gem更新
后遇到了同样的问题),只需执行以下操作:安装您喜欢的版本(如果您还没有)< /p>
gem install compass -v 1.2.3
卸载较新版本
gem uninstall compass -v '>1.2.3' --force
If you want to automate it in a script (I had the same problem after a
gem update
), just do the following:Install your favored version (if you don't have already)
gem install compass -v 1.2.3
Uninstall newer versions
gem uninstall compass -v '>1.2.3' --force
Gem 更新不会“更新”gem,但会安装其更新版本。
因此,您需要卸载较新的版本并保留较旧的版本。
例如,对我来说,我想恢复到旧版本的
selenium-webdriver
,这就是我所做的:这给了我一个选择要卸载的 gem 的选项,具有以下选项:
我输入2 并且最新版本被卸载,让我的系统保留了所需的旧版本。
要安装系统中不存在的特定版本,只需选择 3 卸载所有版本并使用以下命令安装特定版本:
gem install selenium-webdriver -v 3.5.3
Replace
selenium -webdriver
为您的 gem 名称,3.5.3
为您想要的版本。希望这对某人有帮助!
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:This gave me an option to select gem to uninstall, with the following options:
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 and3.5.3
with the version you want.Hope this helps somebody!