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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T20:38:14+00:00 2026-05-29T20:38:14+00:00

I have installed Devise and now want to remove it, including all the files

  • 0

I have installed Devise and now want to remove it, including all the files it has generated. How do I do that?

  • 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-29T20:38:15+00:00Added an answer on May 29, 2026 at 8:38 pm

    I’m looking at solving the same problem today and since this is not answered, giving it a go =)

    Models

    Devise generates a User model if you installed by default.
    Remove the lines under devise. This is how mine looks like.

    devise :database_authenticatable, :registerable,
             :recoverable, :rememberable, :trackable, :validatable
    

    In attr_accessible, you may remove email, :password, password_confirmation and remember_me if you no longer need them.

    Views

    A default Devise install doesn’t generate views in your app folder. If you generated overriding views for Devise, you may remove them by running rails destroy devise:views (Rails 3).

    Generally, all the views are stored in app/views/devise.

    Controllers

    By default, Devise doesn’t generate any controllers too. If you did any overrides, they are most likely known as registrations_controller. Search your project for controllers that inherit Devise::RegistrationsController class.

    Also, if you followed Devise’s wiki and monkey-ed around to add redirect methods etc, look out for methods such as after_sign_in_path_for, store_location etc that are for redirecting users.

    Migrations

    If you installed Devise via its generators, look out for a migration create_users. If you don’t need it anymore, use drop_table :users in a migration to get rid of it.

    I’ll assume most people would want to keep their User model. If you’re using Devise < 2.0, the migrations are done by helpers. Once you remove Devise from the Gemfile, Rails will not understand the helpers below and throw errors, for instance, when you’re trying to rerun these migrations on another box. These helpers are:

    t.database_authenticatable
    t.recoverable  
    t.rememberable
    t.trackable
    
    t.encryptable
    t.confirmable
    t.lockable
    t.token_authenticatable # => becomes t.string :authentication_token
    

    For the exact columns, the below is reference to the columns generated by Devise.

    https://github.com/plataformatec/devise/wiki/How-To:-Upgrade-to-Devise-2.0-migration-schema-style

    The guide above lists the fields generated by Devise using the helpers. You should be able to look through the list and your model (e.g. calling User in console), generate a migration that removes those columns.

    BUT…

    It’s a little unfortunate that for consistency, we have to convert the migration to not use helpers using the guide above then generate a migration to remove them. This is for migration history consistency, otherwise anyone running the migrations might try to call the non-existent helpers. Also, your migration to remove the fields will also expect the fields to be present.

    Alternatively, it might be a good time to squash the migrations and rely on schema.rb / structure.sql for the schema’s to-date state. Even after deleting migrations, you can always recreate your development DB anytime using rake db:schema:load.

    Initializers and Locale

    Remove devise.rb in config/initializers and devise.en.yml in config/locales.

    Routes

    Remove any devise_for lines. These will raise errors after the removal of the gem.

    Gem File

    Yaay. All dome, remove the line gem 'devise' from your gemfile.

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

Sidebar

Related Questions

I have devices running a APK-file that i have provided. (Non-market) I now want
I am newbie with Devise . I have installed Devise . Now I have:
I have installed VisualStudio Express C# in my box. Now I going to install
I have ipa files which are created with Adhoc provision profile. Now, i have
I have an app that I want to distribute to 3.1.x devices, but I
We have build an enterprise iPad App and now we want to give it
I have installed and setup RubyCAS-Server and RubyCAS-Client on my machine. Login works perfectly
I have installed CherryPy 3.1.0,. Here is what happens when I try to run
I have installed Delphi Prism and XNA Game Studio 3.0. I have managed to
I have installed Visual Studio 2008 and patch it with SP1. However, I cannot

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.