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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T12:50:33+00:00 2026-06-06T12:50:33+00:00

Moving rails app to production and running into the routing issues. I’ve read this

  • 0

Moving rails app to production and running into the routing issues. I’ve read this answer:

What is the replacement for ActionController::Base.relative_url_root?

but am still having problems understanding the complete solution, and also, how to continue to develop without caring where the app gets placed.

I am running the app at: http://dev.mycompany.com:8081/myapp/

So I put this in production.rb:

config.action_controller.relative_url_root = “/myapp”

I put this in routes:

 scope "/myapp" do
    root :to => 'application#index'
    match 'login/index' => 'logins#index',        :as => 'logins_index'
  end

In my form tag, I have:

<form class="loginForm" name="loginForm" id="loginForm" action="<%= url_for('/login') %>" method="post">

I thought that everything would magically work, but in fact I needed to put

 action="<%= url_for('/myapp/login') %>"

To get it to work. Is this expected? I don’t want to have to worry about where my app is getting placed for production, but this solution requires it to be in my code. thanks

  • 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-06T12:50:34+00:00Added an answer on June 6, 2026 at 12:50 pm

    You’ve defined helper logins_index_xxx (where xxx can be path or url) but you don’t use it. Why? Try this:

    ... action="<%= logins_index_path %>" ...
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am looking into moving my authentication in a CakePHP app to Rails Devise.
I have a rails app that I'm moving to another server and I figure
I have a rails app that's databases are in SQLite (The dev and production).
I have a rails app moving along fairly well, but the fact that I'm
I'm moving an app to heroku and am having some issues with ssl and
Standard new rails app has issue showing the rails.png ActionController::RoutingError (No route matches [GET]
Running my finished Rails Tutorial app through Rails Best Practices got me a warning
I ran into a big problem in moving my application to Rails 3. I
I'm considering moving a Rails app to Heroku. In general I add FK constraints
Im moving from django to pylons, is there an admin app?

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.