Hi all,
I ran into a problem using the rubygem Ken
(http://rubygems.org/gems/ken). It is used to query freebase. I want to
save the information on tourist attractions of a city @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 a dynamical id so I can query e.g.
"/en/london", "/en/oslo" or "/en/moscow".
Thanks for any advice
···
--
Posted via http://www.ruby-forum.com/.