(this is probably an edge case)
My project had stackprof on 0.2.12 in the Gemfile.lock. It turns out print_json is not defined in this version. It might help someone in the future if you update your gemspec to ensure a supported version of stackprof is installed:
spec.add_dependency 'stackprof', '>= 0.2.13'