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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T15:06:00+00:00 2026-05-20T15:06:00+00:00

ruby newbie alert! (hey that rhymes :)) I have read the official definition but

  • 0

ruby newbie alert! (hey that rhymes :))

I have read the official definition but still come up empty handed. What exactly is it when they say middleware? Is the purpose using ruby with https?

the smallish tutorial at patnaik’s blog makes things clearer but how do I do something with it on localhost? I have ruby 1.9.2 installed along with rack gem and mongrel server.

Do I start mongrel first? How?

  • 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-05-20T15:06:01+00:00Added an answer on May 20, 2026 at 3:06 pm

    Just to add a simplistic explanation of Rack (as I feel that is missing):

    Rack is basically a way in which a web app can communicate with a web server. The communication goes like this:

    1. The web server tells the app about the environment – this contains mainly what the user sent in as his request – the url, the headers, whether it’s a GET or a POST, etc.
    2. The web app responds with three things:
      • the status code which will be something like 200 when everything went OK and above 400 when something went wrong.
      • the headers which is information web browsers can use like information on how long to hold on to the webpage in their cache and other stuff.
      • the body which is the actual webpage you see in the browser.

    These two steps more or less can define the whole process by which web apps work.

    So a very simple Rack app could look like this:

    class MyApp
      def call(environment) # this method has to be named call
        [200, # the status code
         {"Content-Type" => "text/plain", "Content-length" => "11" }, # headers
         ["Hello world"]] # the body
      end
    end
    
    # presuming you have rack & webrick
    if $0 == __FILE__
      require 'rack'
      Rack::Handler::WEBrick.run MyApp.new
    end
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is is that I'm a newbie learning Ruby, or does it really have more
WARNING: Complete newbie to RoR and Ruby alert! * I have a login method
I have the following code. I'm still a newbie in Ruby on Rails. As
[I'm just starting with Ruby, but no question is ever too newbie, so I
I have started learning Ruby, and I have read a couple of tutorials and
Ruby has two different exceptions mechanisms: Throw/Catch and Raise/Rescue. Why do we have two?
Ruby setters—whether created by (c)attr_accessor or manually—seem to be the only methods that need
Ruby on Rails has magic timestamping fields that are automatically updated when a record
I am a Ruby newbie. I am designing a web application and plan to
A bit of a Ruby newbie here - should be an easy question: I

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.