improve error handling if json gem is not installed