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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T16:39:10+00:00 2026-06-06T16:39:10+00:00

I was wondering which could be a better way of mounting different apps for

  • 0

I was wondering which could be a better way of mounting different apps for ruby .
I have 2 sinatra apps and one rails app .

One way is to use rails as base and mount the sinatra apps using the routes.rb (within rails)

RailsApp::Application.routes.draw do
  mount SinatraApp1, :at => "/url1"
  mount SinatraApp2, :at => "/url2"
  # rest of the rail routes
end

This way both the sinatra apps are in rails.

Other way is to use rackup to mount all three using config.ru (all three apps in parallel)

map "/" do
  run RailsApp::Application
end

map "/url1" do
  run SinatraApp1
end

map "/url2" do
  run SinatraApp2
end

I am not able to find the advantages of one over the other or which method is better for what reason.

  • 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-06T16:39:11+00:00Added an answer on June 6, 2026 at 4:39 pm

    Interesting there is any significant difference apart from the fact that in the latter part(application mounted using rackup)

    any requests to

    /url1

    /url2

    would be server directly from the mounted rack application without actually passing the request in the middleware stack of rails and then detect valid rack application for the given mounted path .

    Which would happen in first part where your sinatra application is mounted inside Rails defined in routes.rb of your file

    So I your are trying to mount your sinatra application in routes.rb instead of config.ru then consider the fact that your request would be passed all along rails middleware stack
    where routing middleware detect the appropriate path as passed the request to desired sinatra application

    A Simple check You can do for this is try hitting your path i.e /url1 or /url2 in both the technique and you would see sinatra application routes.rb would log the request in your rails application whereas the other one would not

    Hope this help

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

Sidebar

Related Questions

I was wondering which way is better to work with. Using private attributes at
I was wondering if anyone could point out a cleaner better way to write
I'm wondering which is the better way to add some information to a payment
I am just wondering which of these would be better to use in a
I'm wondering what's the better way to design my website which should output HTML
I was wondering if there was already a component available which the user could
I had accidentally tried this, which compiles! So I was wondering what could this
I am wondering which way would end up being faster, selecting elements by: $('element[href=#my_link]');
I have one table service_contacts which can contain listids from the lists table and
I'm wondering if there is a better way to approach this problem. The objective

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.