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

  • Home
  • SEARCH
  • 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 8681159
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T21:26:05+00:00 2026-06-12T21:26:05+00:00

What is the bare minimum I need to require in Ruby (not Rails or

  • 0

What is the bare minimum I need to require in Ruby (not Rails or any other framework) to easily obtain request data like GETs?

I would like to avoid having to use ruby on rails or any other framework to get this data, so the ideal answer wouldn’t have a framework dependency.

My current setup has a ruby file (script) in a cgi-bin on apache (site.com/script)

#!/usr/bin/env ruby

# bare minimum to output content
puts "Content-type: text/html"
puts

puts "it works!" #works fine.

# how would I obtain request data like GET parameters here
# for a url like site.com/script?hi=there
# in PHP, I would $_GET['hi']
  • 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-12T21:26:06+00:00Added an answer on June 12, 2026 at 9:26 pm

    Ah, solved my problem using the CGI class.

    http://www.ruby-doc.org/stdlib-1.9.3/libdoc/cgi/rdoc/CGI.html

    require 'cgi'
    
    cgi = CGI.new
    
    cgi.params.each do |key, val|
       puts key
       puts val
    end
    

    so site.com/script?hi=there would output hi\nthere

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

Sidebar

Related Questions

My models looks something like this (stripped down to the bare minimum for this
What is the bare minimum I need to put in web.config to get WCF
What are the bare minimum requirements to deploy an exe that uses TFS APIs
I've got a bare-minimum Erlang port driver: erl_driver_bridge.c -> erl_driver_bridge.dll #define __WIN32__ #include erl_driver.h
I've reduced this example to the bare minimum code. I'm focusing on the 'this'
I'm developing a simple php mvc that'll do the bare minimum but work how
Is it possible to use the bare minimum zlib available on iPhone to uncompress
I decided to cut the necessary code down to the bare minimum needed to
Even at the bare minimum of 10 numbers to input, I get no errors
How do you set up NAnt with only the bare minimum binaries? I have

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.