Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8257573
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T02:14:33+00:00 2026-06-08T02:14:33+00:00

I try to learn REST in Ruby using Twitter API. According https://dev.twitter.com/docs/api/1/get/trends I have

  • 0

I try to learn REST in Ruby using Twitter API.

According https://dev.twitter.com/docs/api/1/get/trends I have to write GET request to http://api.twitter.com/1/trends.json.

My Ruby code is:

 require 'rubygems'
 require 'rest-client'
 require 'json'

 url = 'http://api.twitter.com/1/trends.json'
 response = RestClient.get(url)

 puts response.body

But i’m getting next errors:

/home/danik/.rvm/gems/ruby-1.9.3-p194/gems/rest-client-1.6.7/lib/restclient  /abstract_response.rb:48:in `return!': 404 Resource Not Found (RestClient::ResourceNotFound)

from /home/danik/.rvm/gems/ruby-1.9.3-p194/gems/rest-client-1.6.7/lib/restclient/request.rb:230:in `process_result'

from /home/danik/.rvm/gems/ruby-1.9.3-p194/gems/rest-client-1.6.7/lib/restclient/request.rb:178:in `block in transmit'


from /home/danik/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/net/http.rb:745:in `start'

from /home/danik/.rvm/gems/ruby-1.9.3-p194/gems/rest-client-1.6.7/lib/restclient/request.rb:172:in `transmit'

from /home/danik/.rvm/gems/ruby-1.9.3-p194/gems/rest-client-1.6.7/lib/restclient/request.rb:64:in `execute'

from /home/danik/.rvm/gems/ruby-1.9.3-p194/gems/rest-client-1.6.7/lib/restclient/request.rb:33:in `execute'

from /home/danik/.rvm/gems/ruby-1.9.3-p194/gems/rest-client-1.6.7/lib/restclient.rb:68:in `get'

from TwitterTrends.rb:5:in `<main>'

What is wrong?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T02:14:34+00:00Added an answer on June 8, 2026 at 2:14 am

    You are getting that error because the resource you are trying to fetch with http://api.twitter.com/1/trends.json does not exist, as is explained in this doc trends docs

    This method is deprecated and has been replaced by GET trends/:woeid.
    Please update your applications with the new endpoint.

    You want to fetch a URL like this https://api.twitter.com/1/trends/1.json. So, in your code, try doing this:

     require 'rubygems'
     require 'rest-client'
     require 'json'
    
     url = 'https://api.twitter.com/1/trends/1.json'
     response = RestClient.get(url)
    
     puts response.body
    

    And you should get a response.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using org.aspectj.lang.annotation.Pointcut . I have an interface com.home.learn.Try. I want a pointcut
I try to learn use JDO in GWT from https://developers.google.com/appengine/docs/java/datastore/jdo/creatinggettinganddeletingdata In the first sample
I'm using macincloud service to try/play/learn about building iPhone apps. I have a dummy
I am working with this example to try and learn Sencha Touch. I have
I'm writing a simple IRC bot to try to learn more about Clojure, using
Hello I'm very new to OpenGlES and i have started to try to learn
i using word press, and i try to learn it, but is see the
I try to learn OpenGL by creating some sort of 3D Modeler application using
Some projects that I try and learn from don't have a schema.rb file, why
I have some simple code I am using to learn OAuth authentication using the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.