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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T23:09:36+00:00 2026-05-17T23:09:36+00:00

Following the README documentation, I installed Devise into an existing Rails 3 application. However,

  • 0

Following the README documentation, I installed Devise into an existing Rails 3 application. However, it doesn’t seem to work. When I try to access one of my controllers that have before_filter :authenticate_application_user!, I get the following error message:

undefined method 'new_application_user_session_path' for #<Devise::FailureApp::0x60aldc0>

I have no idea why. I’ve checked numerous to see if I followed the installation guide correctly, to no avail. So I’m wondering if anyone cold help me out.

Here is my routes.rb

AwesomeApp::Application.routes.draw do

  devise_for :application_users

  root :to => "home#index"  

  scope "admin" do
    resources :application_users, :path => "users"    
  end
end

Here is my Gemfile:

source 'http://rubygems.org'

gem 'rails', '3.0.0'

gem 'ruby-oci8'
gem 'activerecord-oracle_enhanced-adapter'
gem 'warbler'

gem 'devise', '1.1.3'

group :development, :test do
  gem 'factory_girl_rails'
  gem 'forgery'
end

Here is my migration file for updating my existing database schema:

class DeviseCreateApplicationUsers < ActiveRecord::Migration
  def self.up
    change_table(:application_users) do |t|
      t.rememberable
      t.trackable
    end

  end

  def self.down
    change_table(:application_users) do |t|
      t.remove :rememberable, :trackable
    end
  end
end

NOTE: In case anyone is wondering, I will be authenticating using LDAP. So that’s why you don’t see t.database_authenticatable

Here is my model application_user.rb:

class ApplicationUser < AbstractModel

  devise :rememberable, :trackable, :timeoutable  

end

Here is my devise.rb initializer file:

Devise.setup do |config|
  config.mailer_sender = "please-change-me@config-initializers-devise.com"
  require 'devise/orm/active_record'
  config.authentication_keys = [ :user_ldap_id ]
  config.stretches = 10
  config.encryptor = :bcrypt
  config.pepper = "SALT AND PEPPERS HERE, SALT SALT SALT"
end

NOTE: Because I will be authenticating against LDAP, I am using a different column other than the default email column that Devise defaults to. As a result, I had to install the Devise views (rails g devise:views) and modify the app/views/devise/session/new.html.erb file to use user_ldap_id instead of email.

NOTE: I removed any irrelevant code from these snippets.

  • 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-17T23:09:37+00:00Added an answer on May 17, 2026 at 11:09 pm

    The problem was because I did not have the database_authenticable enabled in my model. Without that, no routes will be generated. But because I don’t need it, there was no point. However, to resolve this issue, I had to install Devise LDAP Authenticatable and enabled it in my model. Once I did that and restarted the server, the route became accessible.

    Take a look at this ticket I created on the Devise Github repo. Someone there was able to walk me through the entire thing. Quite impressed actually at how responsive they were.

    https://github.com/plataformatec/devise/issues/issue/614/#comment_517418

    Added the following to my Gemfile:

    gem 'devise_ldap_authenticatable'
    

    Added the following to my application_users.rb:

    devise :ldap_authenticatable
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

No related questions found

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.