diff --git a/lib/geocoder/lookups/base.rb b/lib/geocoder/lookups/base.rb index 3d8c66febd4c514153b74ad9faf780ea8abfa98a..ae8c8cf54228d44cd56bc7be66cb451c4cd65122 100644 --- a/lib/geocoder/lookups/base.rb +++ b/lib/geocoder/lookups/base.rb @@ -75,6 +75,9 @@ module Geocoder end elsif defined?(ActiveSupport::JSON) ActiveSupport::JSON.decode(raw_data) + else + raise Geocoder::Error, "No JSON-parsing library found. " + + "Please install either the 'json' or 'activesupport' gem." end end