我将加莱 gem 与 Ruby 1.9.3 一起使用,当我使用以下代码片段时:
rdf = Calais.process_document(
:content => text,
:content_type => :html,
:license_id => 'xxxxxxxxxxxxxxxxxxxxxx',
# :output_format => :json,
:metadata_enables => ["SocialTags"]
)
我确定文本在那里。堆栈跟踪如下。有谁知道有什么问题?
Completed 500 Internal Server Error in 39423ms
TypeError - can't convert nil into String:
(gem) calais-0.0.13/lib/calais/response.rb:92:in `parse'
(gem) calais-0.0.13/lib/calais/response.rb:92:in `block in extract_data'
(gem) nokogiri-1.5.6/lib/nokogiri/xml/node_set.rb:239:in `block in each'
(gem) nokogiri-1.5.6/lib/nokogiri/xml/node_set.rb:238:in `upto'
(gem) nokogiri-1.5.6/lib/nokogiri/xml/node_set.rb:238:in `each'
(gem) calais-0.0.13/lib/calais/response.rb:90:in `extract_data'
(gem) calais-0.0.13/lib/calais/response.rb:29:in `initialize'
(gem) calais-0.0.13/lib/calais.rb:56:in `new'
(gem) calais-0.0.13/lib/calais.rb:56:in `process_document'