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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T03:26:42+00:00 2026-06-10T03:26:42+00:00

Okay this seems like a real noob question. I currently have a simple html

  • 0

Okay this seems like a real noob question.

I currently have a simple html and javascript news reader running on my MAMP server. You can see it on Github. Everything runs client side except for fetching and caching the feeds which is done by a really small php file. I have an ajax call which requests the news feed from the php script by passing some parameters to it.

I have of late been learning Ruby and have started to redo this simple php script in Ruby. The problem I have is that I can’t just request the ruby script via ajax with parameters like I would do with php.

So what would be the simplest steps to take to be able to do this?

I feel like a full blown framework, even as small as Sinatra, would be overkill. So any help would be much appreciated. Am I completely thinking about this the wrong way round? Thanks.

Update

I went the Ruby CGI way in the end. Here’s what I did.

In the folder I had my script I added a .htaccess file with the following to make apache execute the .rb file.

AddHandler cgi-script .rb
Options +ExecCGI

Then I started my ruby file off like this.

#!/usr/bin/ruby
require 'cgi'

cgi = CGI.new('html4')

cgi.out {
    cgi.html {
        "Hello World" #started content here   
    }

}

I then made sure the file was executable. chmod 774.

Thanks for all your help.

  • 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-10T03:26:43+00:00Added an answer on June 10, 2026 at 3:26 am

    The simplest solution here would be Ruby CGI.

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

Sidebar

Related Questions

okay, i have no idea why this isn't working at all. it seems like
Okay, it seems to be a stupid question, since we have this However, up
Okay this question is very simple: I have a facebook page, and a website.
Okay this may be a simple question but I have yet to come with
Okay, this seems like it should be relatively simple, but I've been Googling for
Okay, so first, I have searched for this everywhere but it seems like every
I have come across what seems like a really annoying bug running my C++
So this seems like a simple little problem, but I haven't been successful with
Okay, this has made me feel a little peevish because it seems like it
Okay this is definitely a n00b question but here goes. The way I understand

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.