You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hey, many thanks for this gem. I've been able to use it to query the Amazon API by manually loading it into IRB. When I tried to load it into my rails application I ran into some problems though.
Not sure if I'm doing it wrong or not. Here is what I have:
and when I start the rails app (rails s or rails c) I get a stackdump starting with:
/opt/ruby-enterprise-1.8.7-2010.02/lib/ruby/gems/1.8/gems/asin-0.0.8/lib/asin.rb:91:in `merge!': can't convert Class into Hash (TypeError)
I'm done working for the night, but tomorrow I'll probably crack open the gem and see what I can find.
The text was updated successfully, but these errors were encountered:
Yes, thanks for the reply. I also have it in a helper class, I think the problem I was having was that I was doing "include ASIN" instead of "extend ASIN".
my helper class:
module Amazonian
extend ASIN
end
and my initializer:
require 'amazonian'
Amazonian.configure(:secret => '<>', :key => '<>')
I had almost the same setup yesterday when it was throwing that error so I was distilling it down to the bare minimum for some testing. Swapping out that include for extend seems to have done it.
Hey, many thanks for this gem. I've been able to use it to query the Amazon API by manually loading it into IRB. When I tried to load it into my rails application I ran into some problems though.
Not sure if I'm doing it wrong or not. Here is what I have:
config/initializers/asin.rb:
require 'asin'
include ASIN
configure :secret => '', :key => ''
and when I start the rails app (rails s or rails c) I get a stackdump starting with:
/opt/ruby-enterprise-1.8.7-2010.02/lib/ruby/gems/1.8/gems/asin-0.0.8/lib/asin.rb:91:in `merge!': can't convert Class into Hash (TypeError)
I'm done working for the night, but tomorrow I'll probably crack open the gem and see what I can find.
The text was updated successfully, but these errors were encountered: