Ruby - Not able to apply range filter

Referred range filter and combine filter section at Filters | Swiftype Documentation

def talent_search
  client = SwiftypeAppSearch::Client.new(host_identifier: ENV["SWIFTYPE_HOST_IDENDIFIER"], api_key: ENV["SWIFTYPE_SEARCH_KEY"])
  engine_name = ENV["SWIFTYPE_ENGINE_NAME"]
    query = ""
  options = {
    filters: {
      all: [
        {"profile_active": "true"},
        {"desired_compensation": { from: 4000, to: 8000 } }
      ]
    },
    result_fields: { id: {raw: {}}, email: {raw: {}} }
  }

  begin
    response = client.search(engine_name, query, options)
    p response["results"], '----- SWIFTYPE RESPONSE -----'
  rescue SwiftypeAppSearch::ClientException => e
    puts e
    p '==================='
  end    
end  

Getting
Error: Filters contains invalid value for field: desired_compensation; must be a string, or an array of strings

Please let me know what I am missing here.

Responded here: Not able to apply range filter · Issue #39 · swiftype/swiftype-app-search-ruby · GitHub