Hi all,
I ran into a problem using the rubygem Ken
(ken | RubyGems.org | your community gem host). It is used to query freebase. I want to
save the information on tourist attractions of a city in the variable
@info like that:
@city = City.find(params[:id])
cityname = @city.name.downcase
cityname = “"/en/” + cityname + “"”
@info = Ken::Collection.new
@info = Ken.all(:“!pd:/travel/travel_destination/tourist_attractions” =>
[{ :id => cityname }])
This throws the error
“/api/status/error/mql/type: “/en/berlin” is a JSON string, but the
expected type is /type/id”
When I substitute the string “/en/berlin” with the variable cityname as
mql
parameter, it works. But I need it to be dynamical so I can query e.g.
“/en/london”, “/en/oslo” or “/en/moscow” just by calling the id.
This is taken from the wiki.freebase.com
"“value is a JSON type, but the expected type is /path/to/type”: a
constant value (which has JSON type type) was seen where something of
type /path/to/type was expected "
I don’t understand what is meant with that
Thanks for any advice