如何将特定的gem版本设置为默认版本? [英] How to make a specific gem version as default?
本文介绍了如何将特定的gem版本设置为默认版本?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有两个版本的红宝石宝石.
I have two versions of ruby gem.
json (default: 2.0.2, 1.8.6)
此处,最新版本设置为默认;但是我需要将json 1.8.6
设置为默认值.无论如何,可以将较旧版本的gem设置为默认值? cos我无法卸载默认的json版本.需要在可用的gem版本之间进行切换.
Here, the latest version is set to default; however I need json 1.8.6
to be set as default. Is there anyway to make the older versions of the gem as default? cos I am unable to uninstall the default json version. Need a switch between available gem versions.
推荐答案
检查您拥有的物品:
gem list json
设置您想要的一个:
gem install --default -v1.8.6 json
这对于诸如捆绑器"之类的东西最有用!!! 在其他方面,使用捆绑程序和Gemfile可能是一个更好的选择.
This is most useful for things like "bundler"!!! For other things, using bundler and a Gemfile is probably a better choice.
这篇关于如何将特定的gem版本设置为默认版本?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文