Skip to content

Instantly share code, notes, and snippets.

@indirect
Created September 11, 2009 20:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save indirect/185571 to your computer and use it in GitHub Desktop.
Save indirect/185571 to your computer and use it in GitHub Desktop.
[andre /usr/local]$ sudo mkdir Rubygems
[andre /usr/local]$ sudo chown andre:staff Rubygems/
[andre /usr/local]$ export GEM_HOME=/usr/local/Rubygems
[andre /usr/local]$ export PATH=/usr/local/Rubygems/bin:$PATH
# now you can install gems to /usr/local/Rubygems without sudo
[andre /usr/local]$ gem install oniguruma -- --with-onig=/usr/local
Building native extensions. This could take a while...
Successfully installed oniguruma-1.1.0
1 gem installed
[andre /usr/local]$ gem list -d oniguruma
*** LOCAL GEMS ***
oniguruma (1.1.0)
Authors: Dizan Vasquez, Nikolai Lugovoi
Rubyforge: http://rubyforge.org/projects/oniguruma
Homepage: http://oniguruma.rubyforge.org
Installed at: /usr/local/Rubygems
Bindings for the oniguruma regular expression library
[andre /usr/local]$ irb
>> require 'oniguruma'
=> true
# note that rubygems still loads system-installed rubygems just fine
[andre /usr/local]$ gem list -d highline
*** LOCAL GEMS ***
highline (1.5.0)
Author: James Edward Gray II
Rubyforge: http://rubyforge.org/projects/highline
Homepage: http://highline.rubyforge.org
Installed at: /Library/Ruby/Gems/1.8
HighLine is a high-level command-line IO library.
[andre /usr/local]$ irb
>> require 'highline'
=> true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment