Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

undefined method `find' for Wikipedia:Module (NoMethodError) #44

Closed
jeremysklarsky opened this issue Aug 7, 2016 · 7 comments
Closed

Comments

@jeremysklarsky
Copy link

<main>': undefined methodfind' for Wikipedia:Module (NoMethodError)

I'm trying to duplicate the example in the docs, but get a no method error for find.

My code is simple.

@harman28
Copy link
Contributor

@jeremysklarsky How were you able to fix this?

@harman28
Copy link
Contributor

Figured it out, adding this for future reference if someone else comes searching.
You need to add gem 'wikipedia-client' to your Gemfile, and not gem 'wikipedia'. I was adding the latter, which is a completely different gem!

@pietromenna
Copy link
Collaborator

pietromenna commented May 22, 2017

Hi @harman28 ,

This seems to be a problem in the example in the main page. Can you send a Pull Request fixing the example? I believe it could be just to README.textile line below:

require 'wikipedia' 

@harman28
Copy link
Contributor

@pietromenna Not sure what you mean. The README already has this line, and it seems correct.

@pietromenna
Copy link
Collaborator

@harman28 You are right. The idea is to better document how to generate projects which uses this gem. I will figure out how to add this information. Thanks!

@dashlers
Copy link

dashlers commented Sep 24, 2017

Can anyone help? I'm still getting this problem. I have
gem 'wikipedia-client'
in my gemfile and bundle finds the correct gem but when I try it in rails console, I still get the NoMethodError

strangely enough, running
require 'wikipedia'
makes it work so my solution for now is just putting that under the wikipedia-client line in the gem file.

@pietromenna
Copy link
Collaborator

Hi @analogdash ,

The way you are using is actually the correct way to use it. In order to install, you need to install wikipedia-clientgem. To do this, you added to your Gemfile and did a bundle install. The reference is here

Now, to consume you must follow what is in the examples. The correct way is require wikipedia. The example is here

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

No branches or pull requests

4 participants