Skip to content

Instantly share code, notes, and snippets.

@balinterdi
Created March 26, 2010 14:35
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 balinterdi/344945 to your computer and use it in GitHub Desktop.
Save balinterdi/344945 to your computer and use it in GitHub Desktop.
# put this in your ~/.bash_login and then call it like "open_bundler_gem paperclip"
# opens the designated gem in the bundler directory of your Rails app
open_bundler_gem () {
matched_dirs=`find vendor/bundler_gems -name "*$1*" -type d`;
matched_dirs=`echo $matched_dirs`;
gem_dir_pos=`expr "$matched_dirs" : '[^ ]*'`;
mate ${matched_dirs:0:$gem_dir_pos};
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment