简体   繁体   English

从github存储库全局安装ruby gem

[英]Install ruby gem globally from github repository

I want to install a ruby gem globally ( sudo gem install capybara-webkit ) but I want it to be installed from the master in its github repository. 我想在全局安装一个ruby gem( sudo gem install capybara-webkit ),但是我希望它从github存储库中的master安装。 I know this can be done using bundler but I want to do it from the command line because I'm coding mainly using pry. 我知道这可以使用bundler完成,但我想从命令行完成,因为我主要使用pry进行编码。

  1. Download the source: 下载来源:

     git clone https://github.com/thoughtbot/capybara-webkit.git 
  2. Build the gem: 建立宝石:

     cd capybara-webkit && gem build capybara-webkit.gemspec 
  3. Install it (the filename/version may vary): 安装它(文件名/版本可能会有所不同):

     sudo gem install capybara-webkit-0.14.1.gem 

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM