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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T11:50:28+00:00 2026-06-09T11:50:28+00:00

I installed Sinatra using RubyGems, created a simple file called hello.rb file contains: require

  • 0

I installed Sinatra using RubyGems, created a simple file called hello.rb

file contains:

 require 'rubygems'
require 'sinatra'

get '/' do
  puts "Hello World"

end

I navigated on the terminal to desktop on mac to where i saved the hello.rb and did run the file by: ruby hello.rb it gives me message it is running with WEBrick on this port 4567
I went to localhost:4567 then i get this message “Sinatra doesn’t know this ditty.”

Do i have to save the hello.rb file to the WEBrick server folder to make it work? if so, where is that folder located on the mac?

  • 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-09T11:50:30+00:00Added an answer on June 9, 2026 at 11:50 am

    You have to return something, as in:

    get '/' do
      "Hello World" # the return is implicit
    end
    

    Then it will work. puts prints to the command line but returns nil, so nothing was being returned to sinatra.

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

Sidebar

Related Questions

I installed clojure-mode and slime using the emacs starter kit and I get this
I installed virtualmin and phpmyadmin separately using the apt-get command. phpMyAdmin didn't work because
I'm using sinatra/frankie/facebooker to prototype something simple to test the facebook api, i'm using
Using the standard gem for using Markaby with Sinatra, listed at http://www.sinatrarb.com/extensions-wild.html sudo gem
I'm deploying a Sinatra app using passenger. The deployed app is working, but not
I try to get haml working without the gem with sinatra (Heroku doesn't allow
I installed Sinatra and it works but it uses port 4567 by default. I
Does anyone had installed Devise gem with Sinatra? Devise is based on Warden and
Installed Git and created heroku account for use with a facebook app unable to
Installed Tomcat 6 Installed Eclipse + GWT plugin Created GWT project with sample generated

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.