Skip to content
This repository has been archived by the owner on Jun 27, 2020. It is now read-only.

no implicit conversion of Symbol into Integer (TypeError) #48

Open
bfbachmann opened this issue Oct 15, 2016 · 4 comments
Open

no implicit conversion of Symbol into Integer (TypeError) #48

bfbachmann opened this issue Oct 15, 2016 · 4 comments

Comments

@bfbachmann
Copy link

bfbachmann commented Oct 15, 2016

Hi!

Following the example in your documentation I got the following error

/Users/me/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/redditkit-1.0.2/lib/redditkit/client/utilities.rb:71:in '[]': no implicit conversion of Symbol into Integer (TypeError) from /Users/me/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/redditkit-1.0.2/lib/redditkit/client/utilities.rb:71:in 'object_kind_from_response' from /Users/me/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/redditkit-1.0.2/lib/redditkit/client/utilities.rb:41:in 'object_class_from_response' from /Users/me/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/redditkit-1.0.2/lib/redditkit/client/utilities.rb:78:in 'object_from_response' from /Users/me/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/redditkit-1.0.2/lib/redditkit/client/users.rb:17:in 'user' from /Users/me/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/redditkit-1.0.2/lib/redditkit/client/account.rb:22:in 'sign_in' from /Users/me/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/redditkit-1.0.2/lib/redditkit.rb:23:in 'method_missing' from scripts/api_calls.rb:109:in '<main>'

My source code is as follows:

require 'redditkit' RedditKit.sign_in 'myusername', 'mypassword' subreddits = RedditKit.subscribed_subreddits

I have verified that my credentials are correct so I am not quite sure why this is happening.

@jarodreyes
Copy link

@bfbachmann this was fixed here: https://github.com/samsymons/RedditKit.rb/pull/47/files Just make this change locally or point to the github repo directly like:

# In Gemfile
gem 'redditkit', :git => 'https://github.com/samsymons/RedditKit.rb'

@rememberlenny
Copy link

@samsymons Is there a chance to update the rubygem with this?

@Schwad
Copy link

Schwad commented Feb 7, 2017

@jarodreyes 🔥 You're a legend, thanks for that comment.

@siegy22
Copy link

siegy22 commented Feb 22, 2017

@samsymons Are you going to make a release including that fix? 😄

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants