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.
1 Answer
Download the source:
git clone https://github.com/thoughtbot/capybara-webkit.gitBuild the gem:
cd capybara-webkit && gem build capybara-webkit.gemspecInstall it (the filename/version may vary):
sudo gem install capybara-webkit-0.14.1.gem
2 Comments
Shannon Scott Schupbach
I would leave the
sudo off of step 3, (stackoverflow.com/questions/2119064/…) but otherwise, great answer! The one other thing to note is that the .gemspec file isn't always exactly the same as the name of the gem or the directory it's in, so just double check the filename before step 2.gavenkoa
I'm not sure of the effect of
sudo by on Cygwin I used gem install --no-user-install, otherwise it installs into ~/.gem/ruby/$VER. --no-user-install is a saver.