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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T04:08:08+00:00 2026-05-27T04:08:08+00:00

Im trying to override devise in order to send mail to activate a user.

  • 0

Im trying to override devise in order to send mail to activate a user. In the create method in the registrations controller i have this

urlEmail = resource.email.sub('@','-')
Pony.mail(
    :to => resource.email,
    :from => "noreply@mysite.com",
    :subject => "Confirm Account",
    :headers => { 'Content-Type' => 'text/html' },
    :body => ("<h1>Welcome To My Awesome Site</h1>
              <p>follow this link to create your account</p>
              <p>http://localhost:3000/confirm-me/stuff?=" + resource.confirmhash.to_s + "/" + urlEmail.to_s  + "</p>") )

This url leads to a method to activate the user. Whether this is a good way to confirm an account is beside the point. The problem is that when the Pony.mail(…) runs i get this error

uninitialized constant RegistrationsController::Pony

i have installed pony and Pony.mail works in the console. I also tried using require ‘pony’ in the top of the controller file but i get

no such file to load -- pony

What do i need to do to make this work.

  • 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-27T04:08:09+00:00Added an answer on May 27, 2026 at 4:08 am

    It’s look like problem with bundler. Do you run console in the same RAILS_ENV as your controller test?

    Try to copy pony.rb to your lib (from https://github.com/benprew/pony) and require it on the top of controller file. Remove gem "pony" from your Gemfile. bundle install. Make a test.

    If its help, go back to bundler, remove Gemfile.lock and run bundle install.

    If still have this problem include your Gemfile here.

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

Sidebar

Related Questions

i am trying to override devise registrations controller so that user would be able
I'm trying to override a Devise controller to have some minor changes, for example
I have devise 1.4.8, and I am trying to override create at Devise::SessionsController to
I use Devise (1.4.8) for my User model and have been trying to implement
I am trying to override the DataGridViewTextBoxCell's paint method in a derived class so
Edit: This was user error (sorry). I have answered it below. I am developing
I'm trying to create a User show page (that will function as a profile
I am trying to to create a table of 8x5 images as: @Override public
I'm trying to convert an existing Admin model to Devise. We already have a
Trying to override a tostring in one of my classes. return string.Format(@ name =

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.