redd icon indicating copy to clipboard operation
redd copied to clipboard

Getting NoMethodError (undefined method `new' for nil:NilClass)

Open kglns opened this issue 5 years ago • 1 comments

Hello,

I am getting below error when I call Redd.it

I tried 2 versions, both of which produced the same issue.

Versions 0.8.8 0.7.10

>> reddit = Redd.it(
user_agent: 'xxxx',
         client_id: 'xxxx',
         secret: 'xxx',
         username: 'xxx',
         password: 'xxx'
>>  )
Traceback (most recent call last):
        2: from (irb):4
        1: from (irb):4:in `rescue in irb_binding'
NoMethodError (undefined method `new' for nil:NilClass)

kglns avatar May 15 '20 07:05 kglns

Im getting the same thing

edit: My problem was that I was using 0.7.10 and that has a different .it method.

When I tried to update to 0.8.8 I had a conflict with the gem spec for HTTP. I forked the repo and modified the gem spec so the the http version was >= 3.0 and I stopped having the problem. I am not sure this repo is being supported anymore so you may be better off just forking the repo and trying some things out to see if it solves your problem.

drice89 avatar Jul 23 '20 04:07 drice89