{"action":"created","issue":{"url":"https://api.github.com/repos/makersacademy/slack-overflow/issues/91","labels_url":"https://api.github.com/repos/makersacademy/slack-overflow/issues/91/labels{/name}","comments_url":"https://api.github.com/repos/makersacademy/slack-overflow/issues/91/comments","events_url":"https://api.github.com/repos/makersacademy/slack-overflow/issues/91/events","html_url":"https://github.com/makersacademy/slack-overflow/issues/91","id":103870339,"number":91,"title":"TypeError can't dup NilClass","user":{"login":"Yorkshireman","id":8686588,"avatar_url":"https://avatars.githubusercontent.com/u/8686588?v=3","gravatar_id":"","url":"https://api.github.com/users/Yorkshireman","html_url":"https://github.com/Yorkshireman","followers_url":"https://api.github.com/users/Yorkshireman/followers","following_url":"https://api.github.com/users/Yorkshireman/following{/other_user}","gists_url":"https://api.github.com/users/Yorkshireman/gists{/gist_id}","starred_url":"https://api.github.com/users/Yorkshireman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Yorkshireman/subscriptions","organizations_url":"https://api.github.com/users/Yorkshireman/orgs","repos_url":"https://api.github.com/users/Yorkshireman/repos","events_url":"https://api.github.com/users/Yorkshireman/events{/privacy}","received_events_url":"https://api.github.com/users/Yorkshireman/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-08-29T19:01:29Z","updated_at":"2015-09-10T15:38:47Z","closed_at":null,"body":"Rails 4. This is a very strange error that I've been getting with a simple little Rails app that makes a http request to a dictionary api. Controller code:\r\n\r\n```\r\nclass PagesController < ApplicationController\r\n  def home\r\n    @wordlists = Wordlist.all\r\n  end\r\n\r\n  def get_definition\r\n    word = params[\"word\"]\r\n    client = MWDictionaryAPI::Client.new('2a4dee74-e16f-4805-be47-0e41d7e8d840', api_type: \"learners\")\r\n    result = client.search(word)\r\n    puts result.to_hash.keys\r\n    puts result.to_hash[:entries]\r\n    redirect_to root_path\r\n  end\r\nend\r\n```\r\nThe error occurs on the line `result = client.search(word)`. By the way, I'm using a gem that makes method call possible.\r\n\r\nThe rest of the code is here if you need it: https://github.com/Yorkshireman/mywordlist2/tree/2b44f434050063ca931d14301956f0c3fd86aeb2\r\n\r\nNow, after lots of searching, I found no answers. It's not even clear what this error means, except that I think it means that methods can't be duplicated?\r\n\r\nIn the end, I tried making the api call using a word I haven't used before, and there was no error!\r\n\r\nQuestion is, WHY was I getting this error?\r\n\r\nIt was very strange, because yesterday I was getting no errors, even when using the same word over and over. Today, I opened up the app *with no change to my code whatsoever* and the error started happening. Very strange! Can you shed some light on this?\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/makersacademy/slack-overflow/issues/comments/139284445","html_url":"https://github.com/makersacademy/slack-overflow/issues/91#issuecomment-139284445","issue_url":"https://api.github.com/repos/makersacademy/slack-overflow/issues/91","id":139284445,"user":{"login":"mechacoach","id":14219150,"avatar_url":"https://avatars.githubusercontent.com/u/14219150?v=3","gravatar_id":"","url":"https://api.github.com/users/mechacoach","html_url":"https://github.com/mechacoach","followers_url":"https://api.github.com/users/mechacoach/followers","following_url":"https://api.github.com/users/mechacoach/following{/other_user}","gists_url":"https://api.github.com/users/mechacoach/gists{/gist_id}","starred_url":"https://api.github.com/users/mechacoach/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mechacoach/subscriptions","organizations_url":"https://api.github.com/users/mechacoach/orgs","repos_url":"https://api.github.com/users/mechacoach/repos","events_url":"https://api.github.com/users/mechacoach/events{/privacy}","received_events_url":"https://api.github.com/users/mechacoach/received_events","type":"User","site_admin":false},"created_at":"2015-09-10T15:38:46Z","updated_at":"2015-09-10T15:38:46Z","body":"mechacoach!"}}