+1

How about `grep -qE "('|\")rails('|\")"` so we catch the exact gem name.... also there could be a case where the 'rails' gem is commented out ;-) Maybe in future we should replace this by more robust parser, like loading the Gemfile with ruby and checking if the 'rails' gem is enabled.