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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T10:33:47+00:00 2026-05-25T10:33:47+00:00

How do I configure a Rails 3.1 application to run under a specific directory

  • 0

How do I configure a Rails 3.1 application to run under a specific directory such as “/r”?

I tried in config.ru:

map '/r' do
    run Debtor::Application
end

but that just returned “Not Found: /r”

To get it to work I had to enclose all routes in a scope:

scope '/r' do 
    #routes
end

and to add the following line to config/applcation.rb

config.assets.prefix = "/r/assets"

and to move my jquery ui css files from /stylesheets to /r/stylesheets.

this seems too complicated. isn’t there an easier way? and why isn’t my config.ru setting working?

my use case is to have a rails powered ajax backend for a wordpress server.

  • 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-25T10:33:47+00:00Added an answer on May 25, 2026 at 10:33 am

    are you running under passenger?

    Then RailsBaseURI is probably what you want.

    https://www.phusionpassenger.com/library/deploy/apache/deploy/ruby/#deploying-an-app-to-a-sub-uri

    If not running under passenger, please update your question to show what you are deployed under.

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

Sidebar

Related Questions

I would like to configure asp.net process to run under an account with domain
It seems to me that Rails shines when building web-centric applications such as the
I have recently implemented something in a rails application that allows me to read
I am adding a directory for services classes in my rails application: app/services I
I have a rails application that I want to add attachments to assets, so
I'm building a Rails application that deals with file uploads through CarrierWave. Currently, larger
To run Rails application on Windows I do: cd < app_dir > rails server
I'm trying to use bundler in my Rails application. But I can't get it
Is it safe to alter application settings ( config.* ) on a Rails application
I have a Rails 3 application, call it MyApp. In my config\environments\production.rb file 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.