如何从命令行调用旧版本的 gem? [英] How can I call an older version of a gem from the commandline?

查看:21
本文介绍了如何从命令行调用旧版本的 gem?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

假设我安装了两个版本的 gem(somegem 版本 0.10.6 和 0.10.5),我想从命令行运行早期版本.我必须卸载较新的版本吗?有没有办法可以使用标志来指定要使用的版本?有点像……

Say I have two versions of a gem installed (somegem versions 0.10.6 and 0.10.5) and I want to run the earlier version from the commandline. Do I have to uninstall the newer version? Is there a way I can use a flag to specify which version I want to use? Something like...

somegem /path/to/dir --version 0.10.5

我检查了 ruby​​gems 文档,它只描述了当您需要文件中的 gem 时如何使用特定版本,但没有说明如何从命令行执行此操作.

I checked the rubygems documentation, and it only describes how to use a specific version when you require a gem from a file, but nothing about how to do it from the commandline.

推荐答案

somegem _0.10.5_ /path/to/dir

没有文档链接,因为显然没有.

No link to documentation, because apparently there isn't any.

这篇关于如何从命令行调用旧版本的 gem?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆