Skip to content

Instantly share code, notes, and snippets.

@havenwood
Created February 4, 2013 06:00
Show Gist options
  • Save havenwood/4705238 to your computer and use it in GitHub Desktop.
Save havenwood/4705238 to your computer and use it in GitHub Desktop.
Install JSON gem from within Ruby (irc)
require 'rubygems/dependency_installer'
install_dir = File.writable?(Gem.dir) ? Gem.dir : Gem.user_dir
Gem::DependencyInstaller.new(:install_dir => install_dir).new.install 'json'
Gem.refresh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment