Skip to content

Instantly share code, notes, and snippets.

Created Nov 24, 2009
What would you like to do?
RubyGems Defanger
# Populate $BASE with symlinks to what you want, and put the rubygems.rb file at its root.
function rubylib {
if [ -n "$1" ]; then BASE="$1/"; else BASE="/proj/work/rubylib"; fi
export BASE
echo RUBYLIB will use base: $BASE
export RUBYLIB=$BASE:`ruby -e 'puts Dir["#{ENV["BASE"]}/*/**/lib"].join(":")'`:$RUBYLIB
alias rl=rubylib
# RubyGem Defanger
# This basically disables the version-enforcing part of rubygems.
# Ideal for for people who want rubygems to stop fucking with their shit, and for gem
# developers to stop being assholes by forcing people to use it.
# Make sure this file is hit first in $: / $LOADPATH. See the .bashrc piece.
load 'rubygems.rb'
module Kernel
def gem(*args)
raise LoadError if args.first == 'mongrel_experimental'
class Gem::Specification
def add_development_dependency(*args)
def add_dependency(*args)
jpr5@finesse(~)$ rubylib
RUBYLIB will use base: /proj/work/rubylib
jpr5@finesse(~)$ cd /proj/work/dm-core.git
jpr5@finesse(dm-core.git)$ ADAPTERS=mysql rake spec
(in /Projects/work/dm-core.git)
All dependencies seem to be installed.
# 0h gn0z! legg0 my rubyg3mz!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment