Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/api/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ruby 如何在本地计算机上从源代码安装gem?_Ruby_Rubygems - Fatal编程技术网

Ruby 如何在本地计算机上从源代码安装gem?

Ruby 如何在本地计算机上从源代码安装gem?,ruby,rubygems,Ruby,Rubygems,我已经从一个私有存储库下载了一个gem源代码到我的本地机器上,如何从源代码安装它?如果您有完整的源代码,无需使用:git notation,只需转到文件夹并执行以下操作即可 gem build GEMNAME.gemspec gem install gemname-version.gem 你可以把:git指向你的本地地址,比如:`gem'red地毯',:git=>'/home/user/library'`@LuísBianchin我做了,它大声说这是一个目录!gem'lucymar',:git

我已经从一个私有存储库下载了一个gem源代码到我的本地机器上,如何从源代码安装它?

如果您有完整的源代码,无需使用:git notation,只需转到文件夹并执行以下操作即可

gem build GEMNAME.gemspec
gem install gemname-version.gem

你可以把:git指向你的本地地址,比如:`gem'red地毯',:git=>'/home/user/library'`@LuísBianchin我做了,它大声说这是一个目录!gem'lucymar',:git=>'/home/mark/git/lucymar/'bash:/home/mark/git/lucymar/:是一个目录use:path而不是:git另一种方法是'gem install/full/path/to/your.gem'。资料来源: