finding a common way of getting Rails.application