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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T19:42:18+00:00 2026-06-09T19:42:18+00:00

Hi I have added active_admin to my rails app. I would like to create

  • 0

Hi I have added active_admin to my rails app. I would like to create a new AdminUser.

Based on this documentation I tried to create a user and have the app send out an email. The user was created fine in the app, but no email was sent out. I was wondering if anyone can give me suggestions as to why this is not working. Ive double checked my code and its exactly how the documentation says it should be.

What am I missing to make the email be sent out?

Here are the relevant classes

admin/admin_users.rb

ActiveAdmin.register AdminUser do

index do
  column  :email
  column  :current_sign_in_at
  column  :last_sign_in_at
  column  :sign_in_count
  default_actions
end

form do |f|
    f.inputs "Admin Details" do
      f.input :email
    end
    f.buttons
 end
end

models/admin_user.rb

class AdminUser < ActiveRecord::Base
  # Include default devise modules. Others available are:
  # :token_authenticatable, :confirmable,
  # :lockable, :timeoutable and :omniauthable
  devise :database_authenticatable, 
     :recoverable, :rememberable, :trackable, :validatable

  # Setup accessible (or protected) attributes for your model
  attr_accessible :email, :password, :password_confirmation, :remember_me

  after_create { |admin| admin.send_reset_password_instructions }
    def password_required?
      new_record? ? false : super
    end


    before_destroy :raise_if_last
     def raise_if_last
      if AdminUser.count < 2
        raise "Can't delete last admin user"
      end
    end

end

config/environments/development.rb

..........
 #Added per active admin install instructions
  config.action_mailer.default_url_options = { :host => 'localhost:3000' }
  • 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-06-09T19:42:20+00:00Added an answer on June 9, 2026 at 7:42 pm

    sending email from localhost don’t work directly if you haven’t configured sendmail like utility.

    you can either use SMTP for sending emails

    check question below

    send email from localhost

    or you can write emails to a file

    Rails Mailer: sending emails to a local file

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

Sidebar

Related Questions

I have a rails app that is using Devise, with a User model, no
Mostly my entries in seeds.rb are simple, like this: User.create!( name: Peter admin: false;
I have just added cancan 1.5.0 to my rails 3 app here is my
I have added a TextField to a UICell in order to allow a user
I have added an extra field Specification in Catalog->Product->Data tab. This text is stored
I have added the sdk files like dropbox website says, but I can't figure
SOLUTION FOUND: See comment Building a new rails 3.1 app. Started with a basic
if i have an li list like this: <ul> <li>first </li> <li>second</li> <li>third</li> <li>fourth</li>
Given below is my Model definition and I have added this module part of
In this site I would like to highlight the type of sort on 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.