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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T20:48:05+00:00 2026-05-25T20:48:05+00:00

I get a this eror when visit the url http://localhost:3000/admin/login : ActionController::RoutingError in Admin/login#index

  • 0

I get a this eror when visit the url http://localhost:3000/admin/login:
ActionController::RoutingError in Admin/login#index

/app/views/admin/login/index.rhtml where line #18 raised:

No route matches {:action=>"login_in_user", :controller=>"admin/login"}

Extracted source (around line #18):

15:     
16: <h2>Login</h2>
17: <div class="spacer">&nbsp;</div>
18: <%= form_tag(:action => "login_in_user") %>
19: 
20: 
21:  <p>

Here is my Admin login controller class in controllers/admin:

class Admin::LoginController < ApplicationController

My route file:

namespace :admin do
  resources :login
end
match ':controller/service.wsdl', :action => 'wsdl'

# Install the default route as the lowest priority.
match ':controller/:action/:id'

I do have a action named: login_in_user

UPDATE OLD ROUTE FILE:

  map.connect ':controller/service.wsdl', :action => 'wsdl'

  # Install the default route as the lowest priority.
  map.connect ':controller/:action/:id'
  • 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-25T20:48:06+00:00Added an answer on May 25, 2026 at 8:48 pm

    The problem is that you don’t have any mapping for the url you’re trying to create a link to. login_in_user is not one of the standard resource actions, so you need to add it explicitly. The relevant routes.rb entry in your case currently looks like this:

    namespace :admin do
      resources :login
      # and other stuff...
    end
    

    It could work if you did something like this:

    namespace :admin do
      resources :login do
        collection do
          post :login_in_user
        end
      end
    

    However, remember that resources are not a good fit for all controllers. Creating a resources entry generates routes that map to seven specific actions, suitable for managing a resource. A “LoginController” with an action called “login_in_user” doesn’t sound like a resource to me. It’s possible you’re simply trying to create a controller with specific paths to log in through different means. In that case, maybe you could create the routes like so:

    namespace :admin do
      post 'login/login_in_user'           => 'login#login_in_user'
      post 'login/login_in_some_other_way' => 'login#login_in_some_other_way'
      # ...
    end
    

    Some of your other routes seem a bit off to me as well. If you haven’t already, I’d highly recommend reading this rails guide: http://guides.rubyonrails.org/routing.html.

    EDIT:

    One thing I should explain just in case is that rails won’t allow access to your controller’s actions automatically. You always need to have an entry in the routes file for every url the user would need to access. In your case, you have a simple catch-all rule at the bottom that looks like this:

    # Install the default route as the lowest priority.
    match ':controller/:action/:id'
    

    This is not recommended anymore, since it gives needless access to too many actions and no restrictions on the access method (GET, POST, etc.). Even so, if you want to install a catch-all route to your admin interface, you could do the same in your :admin namespace:

    namespace :admin do
      match ':controller/:action/:id'
    end
    

    This should solve your problem in this case, but again, it’s generally not a good idea. I’m under the impression that you’re dealing with legacy code, so it may be a reasonable temporary fix, but I’d still create all the necessary routes by hand first and then think about how to rewrite the controllers to work sensibly with resources. As I noted above, for your problem, this should do the trick:

    namespace :admin do
      post 'login/login_in_user' => 'login#login_in_user'
    end
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I get this error: NoMethodError in Videos#new Showing /rubyprograms/dreamstill/app/views/videos/new.html.erb where line #1 raised: undefined
I get this nice piece of code from http://developer.android.com/resources/samples/ActionBarCompat/index.html , which able to make
I get this error: No endpoint mapping found for [SaajSoapMessage { http://mycompany/coolservice/specs }ChangePerson] Following
I get this error when I try to run my app: 2010-04-29 13:49:01.355 MyApp[56123:207]
I get this error on heroku: 2011-06-01T09:13:29+00:00 app[web.1]: Started GET / for MYIP at
I get this error when I try to use namespaces. I have namespace App;
I get this error: Can't locate Foo.pm in @INC Is there an easier way
I get this error on an update panel within a popupControlExtender which is within
I get this error when I do an svn update : Working copy XXXXXXXX
I get this error:- You have an error in your SQL syntax; check the

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.