Skip to content
Create a gist now

Instantly share code, notes, and snippets.

Embed URL


Subversion checkout URL

You can clone with
Download ZIP
# Re-write for run by @_ZPH
# OO Ruby
gem ='Gemfile').readlines.reject { |l| l =~ /lame/ }.join
File.write('Gemfile', gem)
# obtuse bash
grep -v "lame" Gemfile > !! && mv !!3{.new,}
# ruby one liner
ruby -i -ne 'print unless /lame/' Gemfile

Other variant:
sed -i'.bak' '/factory_girl_rails/d' Gemfile && rm "Gemfile.bak"

File.write('Gemfile','Gemfile').gsub(/.*['"]lame['"].*\n/, ''))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.