The zone class method for the Time class is actually located in active_support/core_ext/time/zones . You can require this class if you really want to use Time.zone , but a better approach might require active_support/all
Recommended Solution
require "active_support/all"
If you want to check source code formatting for active_support, have a look at github repo
source share