add rails.application checking