For inconsistency, we should write this line as follows, I think.

  gems = messages.reject{ |_| _.starts_with?(Rails.root.to_s) }