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 66835
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 10, 20262026-05-10T19:09:56+00:00 2026-05-10T19:09:56+00:00

I am trying to debug an ActiveResource call that is not working. What’s the

  • 0

I am trying to debug an ActiveResource call that is not working.

What’s the best way to view the HTTP response to the request ActiveResource is making?

  • 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. 2026-05-10T19:09:57+00:00Added an answer on May 10, 2026 at 7:09 pm

    It’s easy. Just look at the response that comes back. 🙂

    Two options:

    • You have the source file on your computer. Edit it. Put a puts response.inspect at the appropriate place. Remember to remove it.
    • Ruby has open classes. Find the right method and redefine it to do exactly what you want, or use aliases and call chaining to do this. There’s probably a method that returns the response — grab it, print it, and then return it.

    Here’s a silly example of the latter option.

    # Somewhere buried in ActiveResource: class Network   def get     return get_request   end    def get_request     'I'm a request!'   end end  # Somewhere in your source files: class Network   def print_request     request = old_get_request     puts request     request   end   alias :old_get_request :get_request   alias :get_request :print_request end 

    Imagine the first class definition is in the ActiveRecord source files. The second class definition is in your application somewhere.

    $ irb -r openclasses.rb  >> Network.new.get I'm a request! => 'I'm a request!' 

    You can see that it prints it and then returns it. Neat, huh?

    (And although my simple example doesn’t use it since it isn’t using Rails, check out alias_method_chain to combine your alias calls.)

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

Sidebar

Ask A Question

Stats

  • Questions 247k
  • Answers 247k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer NSScrollView doesn't know anything about the Magic Mouse. The inertial… May 13, 2026 at 8:45 am
  • Editorial Team
    Editorial Team added an answer Try the DataGridView RowHeightChanged event. May 13, 2026 at 8:45 am
  • Editorial Team
    Editorial Team added an answer Symlinking to a directory outside web root as Pascal suggested… May 13, 2026 at 8:45 am

Related Questions

I am trying to debug an ActiveResource call that is not working. What's the
I am trying to debug an asp.net web form that requires a value from
I am trying to debug an application which was not written by myself when
I am trying to debug an issue involving a ClassCastException in Java. In the
I am trying to debug an iPhone app that uses bluetooth for communication. I

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.