ruby - 'require uri' in not working in Rails 4 app -


A utility class requires "Yuri" and does not seem to be loading. Retrieve the error:

  for "query" / undefined method on NoMethodError "https://api.twitter.com/1.1/search/tweets.json?q=%40twitterapi":String  

While. Should be available through some method:

Any ideas on what I'm doing wrong?

The method you are trying to call is available only on the URI object, but you Trying to call it on the string. (Representing Yuri's String)

If you want to be able to use those methods, then you have to create a URI object.

  uri = URI ("https: //api.twitter.com/1.1/search/tweets.json? Q =% 40twitterapi") uri.query # = & gt; "Q =% 40twitterapi"  

Comments

Popular posts from this blog

import - Python ImportError: No module named wmi -

Editing Python Class in Shell and SQLAlchemy -

c# - MySQL Parameterized Select Query joining tables issue -