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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T23:39:29+00:00 2026-05-29T23:39:29+00:00

First I’m quite new to ruby and rails… I have a little application working

  • 0

First I’m quite new to ruby and rails…

I have a little application working with devise 1.5.4. I tried to upgrade to 2.0 but now authentication is failing in development mode (tests seem to be ok !?).
I searched the web quite extensively I think but found nothing. So I tried debugging (first time in ruby 🙂 : the only thing that occured to me is that the only devise “strategy” used is rememberable and that there is no access to the database in the log.

log:

Started POST "/users/sign_in" for 127.0.0.1 at 2012-02-17 15:47:22 +0100
Processing by Devise::SessionsController#create as HTML
Parameters: {"utf8"=>"✓", "authenticity_token"=>"B0YUlSTdLU5vHkSuB4n78rM4ikyiLzTR0PgZmkSVzro=", "user"=>{"email"=>"member001@labandprocess.com", "password"=>"[FILTERED]", "remember_me"=>"0"}, "commit"=>"Sign in"}
Completed 401 Unauthorized in 52ms
Processing by Devise::SessionsController#new as HTML
Parameters: {"utf8"=>"✓", "authenticity_token"=>"B0YUlSTdLU5vHkSuB4n78rM4ikyiLzTR0PgZmkSVzro=", "user"=>{"email"=>"member001@labandprocess.com", "password"=>"[FILTERED]", "remember_me"=>"0"}, "commit"=>"Sign in"}
Rendered devise/_links.erb (0.4ms)
Rendered devise/sessions/new.html.erb within layouts/application (5.7ms)
Rendered shared/_header.html.erb (4.5ms)
Rendered shared/_messages.html.erb (0.1ms)
Rendered shared/_footer.html.erb (27.2ms)
Rendered shared/_user_status.html.erb (0.1ms)
Completed 200 OK in 194ms (Views: 57.6ms | ActiveRecord: 2.1ms)

I made a diff between the 2 versions of my application, and the only thing that has changed beside the views and devise.rb (which is in both case the default one, i’m quite sure) is the migration :

After (2.0):

def change
    create_table(:users) do |t|
        ## Database authenticatable
        t.string :email,              :null => false, :default => ""
        t.string :encrypted_password, :null => false, :default => ""

        ## Recoverable
        t.string   :reset_password_token
        t.datetime :reset_password_sent_at

        ## Rememberable
        t.datetime :remember_created_at

        ## Trackable
        t.integer  :sign_in_count, :default => 0
        t.datetime :current_sign_in_at
        t.datetime :last_sign_in_at
        t.string   :current_sign_in_ip
        t.string   :last_sign_in_ip

        ## Encryptable
        # t.string :password_salt

        ## Confirmable
        t.string   :confirmation_token
        t.datetime :confirmed_at
        t.datetime :confirmation_sent_at
        t.string   :unconfirmed_email # Only if using reconfirmable

        ## Lockable
        t.integer  :failed_attempts, :default => 0 # Only if lock strategy is :failed_attempts
        t.string   :unlock_token                   # Only if unlock strategy is :email or :both
        t.datetime :locked_at

        ## Token authenticatable
        # t.string :authentication_token


        t.timestamps
    end

    add_index :users, :email,                :unique => true
    add_index :users, :reset_password_token, :unique => true
    add_index :users, :confirmation_token,   :unique => true
    add_index :users, :unlock_token,         :unique => true
    # add_index :users, :authentication_token, :unique => true
end

Before (1.5) :

def change
    create_table(:users) do |t|
        t.confirmable
        t.database_authenticatable :null => false
        t.lockable :lock_strategy => :failed_attempts, :unlock_strategy => :both
        t.recoverable
        t.rememberable
        t.trackable
        # t.encryptable
        # t.token_authenticatable

        t.timestamps
    end

    add_index :users, :email,                :unique => true
    add_index :users, :reset_password_token, :unique => true
    add_index :users, :confirmation_token,   :unique => true
    add_index :users, :unlock_token,         :unique => true
    #add_index :users, :authentication_token, :unique => true
end

and I seed data in dev mode with this:

User.create!(
  :email => 'member001@xxx.com',
  :password => 'mmmmmm'
).confirm!

thanks for your help!

  • 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-29T23:39:31+00:00Added an answer on May 29, 2026 at 11:39 pm

    Well, after several hours of comparison, I came to the conclusion that maybe the version of rails is the culprit. I was using 3.1.3 but after upgrading to 3.2.1 (with some other dependencies: i18n_routing and kaminari) it’s working…

    this is certainly not the main reason since the devise documentation states that rails 3.1
    is compatible with devise 2.0, but it’s working for now 🙂

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

Sidebar

Related Questions

First of all, I know how to build a Java application. But I have
First of all Im new to vb 2010 and so far have enjoyed what
First of all: I really tried to find a matching answer for this, but
First off, I am using Windows XP. I have multiple hard drives and it
First off, I'm working on an app that's written such that some of your
First I want to thank you guys here, because your posts have gotten me
First, I have a dbcontext factory which is defined public class DatabaseFactory : Disposable,
First, I have a list of QWidget s that I won't know the length
First off, I'm pretty new so I hope I hadn't missed anything too trivial.
We're building an app, our first using Rails 3, and we're having to build

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.