File.open("myfile", "r") do |f|

  # Skip the garbage before pattern:
  while f.gets !~ /pattern/ do; end

  # Read your data:
  while l = f.gets
    puts l
  end

end