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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T11:02:22+00:00 2026-05-23T11:02:22+00:00

What framework do you recommand for writing simple web applications in ruby, between WebRick

  • 0

What framework do you recommand for writing simple web applications in ruby, between WebRick, Mongrel and Sinatra ?

I would like to answer in json to requests from a client. I would like to have my own code decoupled from the Http framework as much as possible.

Do you know any other framework ?

  • 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-23T11:02:22+00:00Added an answer on May 23, 2026 at 11:02 am

    WEBrick and Mongrel are servers, not frameworks for building web applications. As such, they have APIs that are lower level and tied to their own idiosyncrasies which makes them a bad place to start if you want to design your web application so that it can run on different servers.

    I would look for a framework that builds on Rack, which is the standard base layer for building web apps and web frameworks in Ruby these days.

    If you are making something really simple, learning Rack’s interface by itself is a good place to start.

    E.G., a Rack Application that parses json out of a post request’s body and prints it back out prettified.

    # in a file named config.ru
    require 'json'
    class JSONPrettyPrinterPrinter
      def call env
        request  = Rack::Request.new env
        if request.post?
          object = JSON.parse request.body
          [200, {}, [JSON.pretty_generate(object)]]
        else
          [200, {}, ["nothing to see here"]]
        end
      end
    end
    
    run JSONPrettyPrinterPrinter
    

    you can run it by running rackup in the same dir as the file.

    Or, if you want something a bit more high level, you can use sinatra, which looks like this

    require 'sinatra'
    
    post '/' do
      object = JSON.parse request.body
      JSON.pretty_generate(object)
    end
    

    Sinatra’s README is a good introduction to it’s features.

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

Sidebar

Related Questions

I wanted to select a Framework for writing crosscutting functionality in my project. like
Can you recommend a simple/best tool for an web application developed using Wicket framework?
I like the sinatra framework, but might have to work in python. A quick
I'm going to write simple c++ application, server-client, client-client. I would like to develop
Background Looking to leverage an existing web framework to create a simple data-driven user
I'm writing a Windows version of my Mac app (C# Winforms) and would like
I'm a LOB .NET applications developer that would like to do some www consumer
I am in the process of writing a JSON based web service. The service
Possible Duplicate: Can anyone recommend a simple Java web-app framework? I want to know
Can anyone recommend a framework or basic technology to use to host a web

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.