7. Remove registerable - verachell/Simple-rails-tryout-app-using-devise GitHub Wiki

For this, simply comment out registerable in app/models/user.rb

It should now look like this:

class User < ApplicationRecord
  # Include default devise modules. Others available are:
  # :confirmable, :lockable, :timeoutable, :trackable and :omniauthable :registerable
  devise :database_authenticatable,
         :recoverable, :rememberable, :validatable, :lockable, :timeoutable
end

Check that the sign up path is gone, which it was for me:

localhost:3000/users/sign_up

but that sign in still works

localhost:3000/users/sign_in

The behind the scenes things and routes seems to be handled automagically by Devise for this