Ruby HTTParty soundcloud gem error -
i experimenting soundcloud gem , error every request make.
for example following code:
require 'soundcloud' client = soundcloud.new(:client_id => my_client_id) track_url = 'https://soundcloud.com/sohight/sohight-cheevy-money-is-love-out-now' track = client.get('/resolve', :url => track_url) puts track.genre
anyone knows why error?
/users/angel/.rvm/gems/ruby-2.2.0/gems/httparty-0.13.4/lib/httparty/hash_conversions.rb:33:in `normalize_param': uninitialized constant httparty::hashconversions::erb (nameerror) /users/angel/.rvm/gems/ruby-2.2.0/gems/httparty-0.13.4/lib/httparty/hash_conversions.rb:15:in `block in to_params' /users/angel/.rvm/gems/ruby-2.2.0/gems/httparty-0.13.4/lib/httparty/hash_conversions.rb:15:in `each' /users/angel/.rvm/gems/ruby-2.2.0/gems/httparty-0.13.4/lib/httparty/hash_conversions.rb:15:in `map' /users/angel/.rvm/gems/ruby-2.2.0/gems/httparty-0.13.4/lib/httparty/hash_conversions.rb:15:in `to_params' /users/angel/.rvm/gems/ruby-2.2.0/gems/httparty-0.13.4/lib/httparty/request.rb:148:in `normalize_query' /users/angel/.rvm/gems/ruby-2.2.0/gems/httparty-0.13.4/lib/httparty/request.rb:180:in `query_string' /users/angel/.rvm/gems/ruby-2.2.0/gems/httparty-0.13.4/lib/httparty/request.rb:70:in `uri' /users/angel/.rvm/gems/ruby-2.2.0/gems/httparty-0.13.4/lib/httparty/request.rb:157:in `setup_raw_request' /users/angel/.rvm/gems/ruby-2.2.0/gems/httparty-0.13.4/lib/httparty/request.rb:98:in `perform' /users/angel/.rvm/gems/ruby-2.2.0/gems/httparty-0.13.4/lib/httparty.rb:521:in `perform_request' /users/angel/.rvm/gems/ruby-2.2.0/gems/httparty-0.13.4/lib/httparty.rb:459:in `get' /users/angel/.rvm/gems/ruby-2.2.0/gems/soundcloud-0.3.2/lib/soundcloud/client.rb:27:in `block in get' /users/angel/.rvm/gems/ruby-2.2.0/gems/soundcloud-0.3.2/lib/soundcloud/client.rb:145:in `call' /users/angel/.rvm/gems/ruby-2.2.0/gems/soundcloud-0.3.2/lib/soundcloud/client.rb:145:in `handle_response' /users/angel/.rvm/gems/ruby-2.2.0/gems/soundcloud-0.3.2/lib/soundcloud/client.rb:26:in `get' sound.rb:9:in `<main>'
possibly bug in httparty.
line 33 of hash_conversions.rb
:
param << "#{key}=#{erb::util.url_encode(value.to_s)}&"
put @ top of script , try again:
require 'erb'
Comments
Post a Comment