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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T13:00:39+00:00 2026-06-09T13:00:39+00:00

enter code here i’m a bit newbie, so sorry for this question. i have

  • 0

enter code herei’m a bit newbie, so sorry for this question.

i have a ruby service which created the entire scuffold, and it also supports JSON request.

when i’m running the view which is auto generated through the ruby webserivce (i.e.: http://localhost:3000/mypage.html) which has a json request, everything works perfect.

however, when i try to test this service some some page that i created on a separate project, the JSON response always comes back with “error” and that it.

i used fiddler to see what the difference between the requests and i noticed that there are couple things missing from my own project request header that the standard ruby view has:

  1. cookie
  2. origin/referrer/X-Requested

my question: am i trying to do something that is illegal? does ruby by default support JSON request only if they are local? how do we change it for testing purposes?

any advise would be helpful.

  • 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-09T13:00:40+00:00Added an answer on June 9, 2026 at 1:00 pm

    How did you enable JSON? Modify the controller as following and try again:

    def mypage
      @event = getEvent() # get ur own event
    
      # add followings in the end of the function
      respond_to do |format|
        format.html
        format.json {render :json => @event.to_json}
      end  
    end
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

enter code here Hi All, I have a simple windows service application that connects
I have <.ImageView> enter code here s(icons) in my android layout xml file, which
enter code here I have a table on SQL server 2005 with bigint primary
enter code here I have a ListView that have a different Layout XML for
enter code here My problem is this: in this database the junction table contains
I check like this: enter code here var point = new g.LatLng(parseFloat(lat),parseFloat(lng)); var bounds
i have two dropdown list. first drop down:1 enter code here <form:select path=custName id=custName>
enter code here I'm reading a stream from a device in Linux which contains
which is ideal place to place image in NEtbeans for HTML enter code here
enter code here I have a method that logs errors when an exception is

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.