Maybe you want to read
Performance Tweaks to make your Ruby code run faster
February 23, 2017
Getting Started with Geocoding in Rails – Part 2
July 13, 2016