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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T04:48:31+00:00 2026-05-18T04:48:31+00:00

I am trying to set up a sinatra app inside my Rails 3 (v3.0.1)

  • 0

I am trying to set up a sinatra app inside my Rails 3 (v3.0.1) application, but having no success. Sinatra gem (v1.1.0) is setup using bundle install.

Here’s what i have.

customer_app.rb class in lib directory –

class CustomerApp < Sinatra::Base

  get "/test" do
    "Hello World"
  end

end

my routes.rb file contains –

CustomerService::Application.routes.draw do

    root :to => CustomerApp

end

The URL i am trying is – http://localhost:3000/test

I get this error (on the browser) – Routing Error. No route matches “/test”

and this error in the log – ActionController::RoutingError (No route matches “/test”):

Is there anything I am missing??

Also I just noticed, even a simple rack route is not working –

root :to => proc { |env| [200, {}, ["Welcome!"]]}
  • 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-18T04:48:31+00:00Added an answer on May 18, 2026 at 4:48 am

    The root keyword by default maps only the path /.

    So you are trying to say, forward any request for / to CustomerApp which can handle requests for /test.

    You should change the match filter.

    CustomerService::Application.routes.draw do
      match "/test" :to => CustomerApp
    end
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to set up a Sinatra based Ruby app to connect to
Trying to set up Cancan within an app of mine and having trouble with
I'm trying to get my first Sinatra app off the ground, but am getting
I'm new to backbone and trying to set it up in Sinatra, but I
I'm trying to recreate a Sinatra app (using a recipe from a book) into
I'm building a small Ruby application using DataMapper and Sinatra, and I'm trying to
I'm trying to write a Sinatra app that will run on a shared Passenger
I am trying set up a simple dropdown list but I dont seem to
I am using mac lion and eclipse indigo. I am trying set it up
I've got a Sinatra app that I'm trying to run on Dreamhost that makes

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.