Skip to content

Instantly share code, notes, and snippets.

@AndrewRadev
Created December 20, 2012 14:15
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save AndrewRadev/4345520 to your computer and use it in GitHub Desktop.
Save AndrewRadev/4345520 to your computer and use it in GitHub Desktop.
Use 'ack' to search through all the gems in the project. Call with "bundle exec ack-gems".
#! /usr/bin/env ruby
require 'bundler'
paths = Bundler.load.specs.map(&:full_gem_path)
system("ack '#{ARGV[0]}' #{paths.join(' ')}")
@tadassce
Copy link

I guess it's missing a space after "ack", right?

@AndrewRadev
Copy link
Author

Whoops, yeah. I use ag instead, so I must've messed it up while changing.

@dolzenko
Copy link

dolzenko commented Sep 5, 2013

Genious!

@dfang
Copy link

dfang commented Feb 11, 2014

ack/ag ActiveRecord::Base bundle show --paths

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment