viralheat/sentiment_analysis — Issue #2: TypeError: can't convert Symbol into Integer
Author: henry74
Created: 2011-10-20 14:19:18+00:00
State: open

I'm receiving the following error when attempting to run the following after creating a client with an API key:

ruby-1.9.2-p290 :004 > puts s.quota
5000
=> nil
ruby-1.9.2-p290 :005 > puts s.review("you are terrible")
TypeError: can't convert Symbol into Integer
from /home/testuser/playground/sandbox/vendor/ruby/1.9.1/bundler/gems/sentiment_analysis-07df2537f6e8/lib/sentiment_analysis/client.rb:42:in `[]'
from /home/testuser/playground/sandbox/vendor/ruby/1.9.1/bundler/gems/sentiment_analysis-07df2537f6e8/lib/sentiment_analysis/client.rb:42:in `review'
from (irb):5
from /home/testuser/.rvm/rubies/ruby-1.9.2-p290/bin/irb:16:in `

'
ruby-1.9.2-p290 :006 > puts s.review("test")
TypeError: can't convert Symbol into Integer
from /home/testuser/playground/sandbox/vendor/ruby/1.9.1/bundler/gems/sentiment_analysis-07df2537f6e8/lib/sentiment_analysis/client.rb:42:in `[]'
from /home/testuser/playground/sandbox/vendor/ruby/1.9.1/bundler/gems/sentiment_analysis-07df2537f6e8/lib/sentiment_analysis/client.rb:42:in `review'
from (irb):6
from /home/testuser/.rvm/rubies/ruby-1.9.2-p290/bin/irb:16:in `

'
ruby-1.9.2-p290 :007 >