Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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. 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.

like image 494
GTDev Avatar asked May 03 '13 18:05

GTDev


People also ask

How do I push a gem to RubyGems?

Note that you need an account at RubyGems.org to do this. From the main menu, select Tools | Gem | Push Gem. In the Run tool window, specify your RubyGems credentials. Your gem will be published to RubyGems.org.

How do I install gems?

To install a gem, use gem install [gem] . Browsing installed gems is done with gem list . For more information about the gem command, see below or head to RubyGems' docs.

Where are RubyGems stored?

When you use the --user-install option, RubyGems will install the gems to a directory inside your home directory, something like ~/. gem/ruby/1.9.

Does Ruby come with RubyGems?

The public repository helps users find gems, resolve dependencies and install them. RubyGems is bundled with the standard Ruby package as of Ruby 1.9.


1 Answers

  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 
like image 189
Wally Altman Avatar answered Oct 13 '22 17:10

Wally Altman