Forum: Ruby on Rails Emails Not Sending

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
7ad6d6bd15d07e72f89a855c7f5199d7?d=identicon&s=25 Edward Maya (maya_badmash)
on 2015-04-14 13:15
Hello Guys,

i have cloned this app
https://github.com/RailsApps/rails-devise-roles/

everything is fine but when i hit sign_up  and fill out the form then it
should be sending an email but somehow it is not doing what it's
supposed to do.
my development.rb after replacing existing settings for email

config.action_mailer.smtp_settings = {
  address:              'smtp.gmail.com',
  port:                 587,
  domain:               'gmail.com',
  user_name:            'my_email',
  password:             'my_password',
  authentication:       'plain',
  enable_starttls_auto: true  }
4c6bde00168d595053c09aac7e487f8e?d=identicon&s=25 Colin Law (Guest)
on 2015-04-14 17:34
(Received via mailing list)
On 14 April 2015 at 12:15, Edward Maya <lists@ruby-forum.com> wrote:
> config.action_mailer.smtp_settings = {
>   address:              'smtp.gmail.com',
>   port:                 587,
>   domain:               'gmail.com',
>   user_name:            'my_email',
>   password:             'my_password',
>   authentication:       'plain',
>   enable_starttls_auto: true  }

What is in development.log when you try to do it?

I have not done gmail from rails, presumably you googled to find the
appropriate configuration.

Colin

Colin
7ad6d6bd15d07e72f89a855c7f5199d7?d=identicon&s=25 Edward Maya (maya_badmash)
on 2015-04-14 19:09
Colin Law wrote in post #1172030:
> What is in development.log when you try to do it?
>
> I have not done gmail from rails, presumably you googled to find the
> appropriate configuration.
>
> Colin
>
> Colin

Oh My Dear Lord Please Forgive Me _/\_ Any One OutThere Please Help Me.
Bee69cfed999cd13e3bff73d472a39ee?d=identicon&s=25 Hassan Schroeder (Guest)
on 2015-04-14 20:28
(Received via mailing list)
On Tue, Apr 14, 2015 at 10:09 AM, Edward Maya <lists@ruby-forum.com>
wrote:

>> What is in development.log when you try to do it?

> Oh My Dear Lord Please Forgive Me _/\_ Any One OutThere Please Help Me.

Ask for help -- ignore and disparage help given.

Not sure that's a winning strategy, but good luck with it.

--
Hassan Schroeder ------------------------ hassan.schroeder@gmail.com
http://about.me/hassanschroeder
twitter: @hassan
Consulting Availability : Silicon Valley or remote
7ad6d6bd15d07e72f89a855c7f5199d7?d=identicon&s=25 Edward Maya (maya_badmash)
on 2015-04-14 21:48
Hassan Schroeder wrote in post #1172042:
> Ask for help -- ignore and disparage help given.
>
> Not sure that's a winning strategy, but good luck with it.
>
> --
> Hassan Schroeder ------------------------ hassan.schroeder@gmail.com
> http://about.me/hassanschroeder
> twitter: @hassan
> Consulting Availability : Silicon Valley or remote

I Have ask many questions here and he always confuses me a lot with
asking stuff no one ask for anywhere and eventually i left with 2 step
backwards from when i ask.
46f52c33235283752423837b91c581dd?d=identicon&s=25 Norm Scherer (Guest)
on 2015-04-14 22:56
(Received via mailing list)
What Colin asks for is reasonable and predictable.  He wants to see what
the exact error messages are and he wants to see the code that generated
the message.  As well he wants to verify that you have at least
completed a tutorial so you know what you are doing.

I agree with him.

Norm
Bee69cfed999cd13e3bff73d472a39ee?d=identicon&s=25 Hassan Schroeder (Guest)
on 2015-04-14 23:09
(Received via mailing list)
On Tue, Apr 14, 2015 at 12:48 PM, Edward Maya <lists@ruby-forum.com>
wrote:

> I Have ask many questions here and he always confuses me a lot with
> asking stuff no one ask for anywhere and eventually i left with 2 step
> backwards from when i ask.

If you truly believe that the question

   "What is in development.log when you try to do it?"

is taking you "2 step backwards", or is not a question that *any*
experienced developer would ask -- mm,kay.

So walk me through your mental process. Other than looking at the
log files, how would you reason about the failure of your program?
Where would you look for clues?

--
Hassan Schroeder ------------------------ hassan.schroeder@gmail.com
http://about.me/hassanschroeder
twitter: @hassan
Consulting Availability : Silicon Valley or remote
Fde839db701c9efdfb1b30823b9a2cc8?d=identicon&s=25 Robby O'Connor (Guest)
on 2015-04-14 23:35
(Received via mailing list)
Asking for help on irc, stackoverflow, or anywhere is NOT a replacement
for
basic research on your own. Asking that you have basic competence...so
yeh.
This is a major pet peeve of mine.

--Rob
Sent from my cell, please excuse any typos.
On Apr 14, 2015 5:07 PM, "Hassan Schroeder" <hassan.schroeder@gmail.com>
15eb13d662803f57bc4aea59704988b4?d=identicon&s=25 Scott Ribe (Guest)
on 2015-04-15 00:36
(Received via mailing list)
On Apr 14, 2015, at 11:09 AM, Edward Maya <lists@ruby-forum.com> wrote:
>
> Oh My Dear Lord Please Forgive Me _/\_ Any One OutThere Please Help Me.

****NO ONE**** is going to help you if you don't look in your damned
development log and tell us what is logged by your attempt to send
email. Without that, all we can do is make wild guesses, whereas with
that there's a decent chance someone will be able to tell you exactly
what the problem is.
Fde839db701c9efdfb1b30823b9a2cc8?d=identicon&s=25 Robby O'Connor (Guest)
on 2015-04-15 00:39
(Received via mailing list)
In addition the "woe is me" shit is not flattering.

--Rob
Sent from my cell, please excuse any typos.
7ad6d6bd15d07e72f89a855c7f5199d7?d=identicon&s=25 Edward Maya (maya_badmash)
on 2015-04-15 07:01
wooh Calm down guys there's no need to bite a chunk out of my ass,
that's totally my choice whom to no or yes. any problem leave the thread
~(-_-)~  as there are plenty of rails forum out there where seriously
wants to help if someone facing any problem other then flamming and
lecturing the shit out of him with dialogues #Peace/.Out
Fde839db701c9efdfb1b30823b9a2cc8?d=identicon&s=25 Robby O'Connor (Guest)
on 2015-04-15 07:12
(Received via mailing list)
With the amount of time you've spent whining and arguing and acting like
you're a victim...why not just share what's in your development.log
file...as you were asked really early in this thread. You are not
entitled to help, in fact we can just say f off, some might...I
won't...so just do what we asked...because quite frankly -- all i've
heard is you whine which is why I'm pissed at you personally.
7ad6d6bd15d07e72f89a855c7f5199d7?d=identicon&s=25 Edward Maya (maya_badmash)
on 2015-04-15 08:55
Robby O'Connor wrote in post #1172062:
> With the amount of time you've spent whining and arguing and acting like
> you're a victim...why not just share what's in your development.log
> file...as you were asked really early in this thread. You are not
> entitled to help, in fact we can just say f off, some might...I
> won't...so just do what we asked...because quite frankly -- all i've
> heard is you whine which is why I'm pissed at you personally.

Started GET "/" for 127.0.0.1 at 2015-04-15 12:14:01 +0530
  [1m[36mActiveRecord::SchemaMigration Load (0.7ms)[0m  [1mSELECT
"schema_migrations".* FROM "schema_migrations"[0m
Processing by VisitorsController#index as HTML
  [1m[35m (0.5ms)[0m  SELECT COUNT(*) FROM "users"
  Rendered visitors/index.html.erb within layouts/application (36.5ms)
  Rendered layouts/_navigation_links.html.erb (51.2ms)
  Rendered layouts/_navigation.html.erb (65.1ms)
  Rendered layouts/_messages.html.erb (1.6ms)
Completed 200 OK in 3781ms (Views: 3640.1ms | ActiveRecord: 7.2ms)


Started GET "/users/sign_up" for 127.0.0.1 at 2015-04-15 12:14:08 +0530
Processing by Devise::RegistrationsController#new as HTML
  Rendered devise/registrations/new.html.erb within layouts/application
(287.0ms)
  Rendered layouts/_navigation_links.html.erb (1.6ms)
  Rendered layouts/_navigation.html.erb (4.6ms)
  Rendered layouts/_messages.html.erb (0.6ms)
Completed 200 OK in 1272ms (Views: 1016.6ms | ActiveRecord: 1.4ms)


Started POST "/users" for 127.0.0.1 at 2015-04-15 12:14:21 +0530
Processing by Devise::RegistrationsController#create as HTML
  Parameters: {"utf8"=>"✓",
"authenticity_token"=>"/hlfWSuave2dv+n5BSXb/iXSAAfyG7swubt34y0ctADi3sFWXMmt8IwpZoYYn/i+vRpvXnEcFyJmdpCoacXWww==",
"user"=>{"name"=>"Chirag Arya", "email"=>"edwardmaya008@gmail.com",
"password"=>"[FILTERED]", "password_confirmation"=>"[FILTERED]"},
"commit"=>"Sign up"}
  [1m[36m (0.4ms)[0m  [1mbegin transaction[0m
  [1m[35mUser Exists (0.6ms)[0m  SELECT  1 AS one FROM "users" WHERE
"users"."email" = 'edwardmaya008@gmail.com' LIMIT 1
  [1m[36mUser Load (1.2ms)[0m  [1mSELECT  "users".* FROM "users" WHERE
"users"."confirmation_token" = ?  ORDER BY "users"."id" ASC LIMIT 1[0m
[["confirmation_token",
"f41567c6ddb783f39206ae49bef6415315fdbdda0bc7ecc3b6cdbd8cebe82bc7"]]
  [1m[35mSQL (2.2ms)[0m  INSERT INTO "users" ("email",
"encrypted_password", "name", "role", "created_at", "updated_at",
"confirmation_token", "confirmation_sent_at") VALUES (?, ?, ?, ?, ?, ?,
?, ?)  [["email", "edwardmaya008@gmail.com"], ["encrypted_password",
"$2a$10$R.hBU1Eo4koKO6i.HzVdPuxOzYcDGwo0iVZq2UNbs.bsqGLergAem"],
["name", "Chirag Arya"], ["role", 0], ["created_at", "2015-04-15
06:44:23.074144"], ["updated_at", "2015-04-15 06:44:23.074144"],
["confirmation_token",
"f41567c6ddb783f39206ae49bef6415315fdbdda0bc7ecc3b6cdbd8cebe82bc7"],
["confirmation_sent_at", "2015-04-15 06:44:25.369904"]]
  Rendered
/home/malware/.rvm/gems/ruby-2.2.0@finalproject/gems/devise-3.4.1/app/views/devise/mailer/confirmation_instructions.html.erb
(3.2ms)

Devise::Mailer#confirmation_instructions: processed outbound mail in
1233.2ms

Sent mail to edwardmaya008@gmail.com (5526.5ms)
Date: Wed, 15 Apr 2015 12:14:26 +0530
From: no-reply@gmail.com
Reply-To: no-reply@gmail.com
To: edwardmaya008@gmail.com
Message-ID: <552e08cab9fc7_715f61f23c6852d3@Unbeatable-Lord.mail>
Subject: Confirmation instructions
Mime-Version: 1.0
Content-Type: text/html;
 charset=UTF-8
Content-Transfer-Encoding: 7bit

<p>Welcome edwardmaya008@gmail.com!</p>

<p>You can confirm your account email through the link below:</p>

<p><a
href="http://localhost:3000/users/confirmation?confirmat...
my account</a></p>

  [1m[36m (0.7ms)[0m  [1mrollback transaction[0m
Completed 500 Internal Server Error in 10379ms (ActiveRecord: 5.0ms)

Net::SMTPAuthenticationError - 530-5.5.1 Authentication Required. Learn
more at
:
  /home/malware/.rvm/rubies/ruby-2.2.0/lib/ruby/2.2.0/net/smtp.rb:964:in
`check_response'
  /home/malware/.rvm/rubies/ruby-2.2.0/lib/ruby/2.2.0/net/smtp.rb:933:in
`getok'
  /home/malware/.rvm/rubies/ruby-2.2.0/lib/ruby/2.2.0/net/smtp.rb:841:in
`mailfrom'
  /home/malware/.rvm/rubies/ruby-2.2.0/lib/ruby/2.2.0/net/smtp.rb:662:in
`send_message'
  mail (2.6.3) lib/mail/network/delivery_methods/smtp.rb:113:in `block
in deliver!'
  /home/malware/.rvm/rubies/ruby-2.2.0/lib/ruby/2.2.0/net/smtp.rb:521:in
`start'
  mail (2.6.3) lib/mail/network/delivery_methods/smtp.rb:112:in
`deliver!'
  mail (2.6.3) lib/mail/message.rb:2141:in `do_delivery'
  mail (2.6.3) lib/mail/message.rb:236:in `block in deliver'
  actionmailer (4.2.1) lib/action_mailer/base.rb:543:in `block in
deliver_mail'
  activesupport (4.2.1) lib/active_support/notifications.rb:164:in
`block in instrument'
  activesupport (4.2.1)
lib/active_support/notifications/instrumenter.rb:20:in `instrument'
  activesupport (4.2.1) lib/active_support/notifications.rb:164:in
`instrument'
  actionmailer (4.2.1) lib/action_mailer/base.rb:541:in `deliver_mail'
  mail (2.6.3) lib/mail/message.rb:236:in `deliver'
  actionmailer (4.2.1) lib/action_mailer/message_delivery.rb:85:in
`deliver_now'
  devise (3.4.1) lib/devise/models/authenticatable.rb:176:in
`send_devise_notification'
  devise (3.4.1) lib/devise/models/confirmable.rb:102:in
`send_confirmation_instructions'
  devise (3.4.1) lib/devise/models/confirmable.rb:158:in
`send_on_create_confirmation_instructions'
  activesupport (4.2.1) lib/active_support/callbacks.rb:432:in `block in
make_lambda'
  activesupport (4.2.1) lib/active_support/callbacks.rb:228:in `block in
halting_and_conditional'
  activesupport (4.2.1) lib/active_support/callbacks.rb:506:in `block in
call'
  activesupport (4.2.1) lib/active_support/callbacks.rb:506:in `call'
  activesupport (4.2.1) lib/active_support/callbacks.rb:92:in
`_run_callbacks'
  activesupport (4.2.1) lib/active_support/callbacks.rb:776:in
`_run_create_callbacks'
  activerecord (4.2.1) lib/active_record/callbacks.rb:306:in
`_create_record'
  activerecord (4.2.1) lib/active_record/timestamp.rb:57:in
`_create_record'
  activerecord (4.2.1) lib/active_record/persistence.rb:502:in
`create_or_update'
  activerecord (4.2.1) lib/active_record/callbacks.rb:302:in `block in
create_or_update'
  activesupport (4.2.1) lib/active_support/callbacks.rb:88:in
`_run_callbacks'
  activesupport (4.2.1) lib/active_support/callbacks.rb:776:in
`_run_save_callbacks'
  activerecord (4.2.1) lib/active_record/callbacks.rb:302:in
`create_or_update'
  activerecord (4.2.1) lib/active_record/persistence.rb:120:in `save'
  activerecord (4.2.1) lib/active_record/validations.rb:37:in `save'
  activerecord (4.2.1)
lib/active_record/attribute_methods/dirty.rb:21:in `save'
  activerecord (4.2.1) lib/active_record/transactions.rb:286:in `block
(2 levels) in save'
  activerecord (4.2.1) lib/active_record/transactions.rb:347:in `block
in with_transaction_returning_status'
  activerecord (4.2.1)
lib/active_record/connection_adapters/abstract/database_statements.rb:213:in
`block in transaction'
  activerecord (4.2.1)
lib/active_record/connection_adapters/abstract/transaction.rb:188:in
`within_new_transaction'
  activerecord (4.2.1)
lib/active_record/connection_adapters/abstract/database_statements.rb:213:in
`transaction'
  activerecord (4.2.1) lib/active_record/transactions.rb:220:in
`transaction'
  activerecord (4.2.1) lib/active_record/transactions.rb:344:in
`with_transaction_returning_status'
  activerecord (4.2.1) lib/active_record/transactions.rb:286:in `block
in save'
  activerecord (4.2.1) lib/active_record/transactions.rb:301:in
`rollback_active_record_state!'
  activerecord (4.2.1) lib/active_record/transactions.rb:285:in `save'
  devise (3.4.1)
app/controllers/devise/registrations_controller.rb:19:in `create'
  actionpack (4.2.1) lib/action_controller/metal/implicit_render.rb:4:in
`send_action'
  actionpack (4.2.1) lib/abstract_controller/base.rb:198:in
`process_action'
  actionpack (4.2.1) lib/action_controller/metal/rendering.rb:10:in
`process_action'
  actionpack (4.2.1) lib/abstract_controller/callbacks.rb:20:in `block
in process_action'
  activesupport (4.2.1) lib/active_support/callbacks.rb:117:in `call'
  activesupport (4.2.1) lib/active_support/callbacks.rb:555:in `block (2
levels) in compile'
  activesupport (4.2.1) lib/active_support/callbacks.rb:505:in `call'
  activesupport (4.2.1) lib/active_support/callbacks.rb:92:in
`_run_callbacks'
  activesupport (4.2.1) lib/active_support/callbacks.rb:776:in
`_run_process_action_callbacks'
  activesupport (4.2.1) lib/active_support/callbacks.rb:81:in
`run_callbacks'
  actionpack (4.2.1) lib/abstract_controller/callbacks.rb:19:in
`process_action'
  actionpack (4.2.1) lib/action_controller/metal/rescue.rb:29:in
`process_action'
  actionpack (4.2.1)
lib/action_controller/metal/instrumentation.rb:32:in `block in
process_action'
  activesupport (4.2.1) lib/active_support/notifications.rb:164:in
`block in instrument'
  activesupport (4.2.1)
lib/active_support/notifications/instrumenter.rb:20:in `instrument'
  activesupport (4.2.1) lib/active_support/notifications.rb:164:in
`instrument'
  actionpack (4.2.1)
lib/action_controller/metal/instrumentation.rb:30:in `process_action'
  actionpack (4.2.1)
lib/action_controller/metal/params_wrapper.rb:250:in `process_action'
  activerecord (4.2.1)
lib/active_record/railties/controller_runtime.rb:18:in `process_action'
  actionpack (4.2.1) lib/abstract_controller/base.rb:137:in `process'
  actionview (4.2.1) lib/action_view/rendering.rb:30:in `process'
  actionpack (4.2.1) lib/action_controller/metal.rb:196:in `dispatch'
  actionpack (4.2.1)
lib/action_controller/metal/rack_delegation.rb:13:in `dispatch'
  actionpack (4.2.1) lib/action_controller/metal.rb:237:in `block in
action'
  actionpack (4.2.1) lib/action_dispatch/routing/route_set.rb:74:in
`dispatch'
  actionpack (4.2.1) lib/action_dispatch/routing/route_set.rb:43:in
`serve'
  actionpack (4.2.1) lib/action_dispatch/routing/mapper.rb:49:in `serve'
  actionpack (4.2.1) lib/action_dispatch/journey/router.rb:43:in `block
in serve'
  actionpack (4.2.1) lib/action_dispatch/journey/router.rb:30:in `serve'
  actionpack (4.2.1) lib/action_dispatch/routing/route_set.rb:819:in
`call'
  warden (1.2.3) lib/warden/manager.rb:35:in `block in call'
  warden (1.2.3) lib/warden/manager.rb:34:in `call'
  rack (1.6.0) lib/rack/etag.rb:24:in `call'
  rack (1.6.0) lib/rack/conditionalget.rb:38:in `call'
  rack (1.6.0) lib/rack/head.rb:13:in `call'
  actionpack (4.2.1)
lib/action_dispatch/middleware/params_parser.rb:27:in `call'
  actionpack (4.2.1) lib/action_dispatch/middleware/flash.rb:260:in
`call'
  rack (1.6.0) lib/rack/session/abstract/id.rb:225:in `context'
  rack (1.6.0) lib/rack/session/abstract/id.rb:220:in `call'
  actionpack (4.2.1) lib/action_dispatch/middleware/cookies.rb:560:in
`call'
  activerecord (4.2.1) lib/active_record/query_cache.rb:36:in `call'
  activerecord (4.2.1)
lib/active_record/connection_adapters/abstract/connection_pool.rb:649:in
`call'
  activerecord (4.2.1) lib/active_record/migration.rb:378:in `call'
  actionpack (4.2.1) lib/action_dispatch/middleware/callbacks.rb:29:in
`block in call'
  activesupport (4.2.1) lib/active_support/callbacks.rb:88:in
`_run_callbacks'
  activesupport (4.2.1) lib/active_support/callbacks.rb:776:in
`_run_call_callbacks'
  activesupport (4.2.1) lib/active_support/callbacks.rb:81:in
`run_callbacks'
  actionpack (4.2.1) lib/action_dispatch/middleware/callbacks.rb:27:in
`call'
  actionpack (4.2.1) lib/action_dispatch/middleware/reloader.rb:73:in
`call'
  actionpack (4.2.1) lib/action_dispatch/middleware/remote_ip.rb:78:in
`call'
  better_errors (2.1.1) lib/better_errors/middleware.rb:84:in
`protected_app_call'
  better_errors (2.1.1) lib/better_errors/middleware.rb:79:in
`better_errors_call'
  better_errors (2.1.1) lib/better_errors/middleware.rb:57:in `call'
  actionpack (4.2.1)
lib/action_dispatch/middleware/debug_exceptions.rb:17:in `call'
  web-console (2.1.2) lib/web_console/middleware.rb:37:in `call'
  actionpack (4.2.1)
lib/action_dispatch/middleware/show_exceptions.rb:30:in `call'
  railties (4.2.1) lib/rails/rack/logger.rb:38:in `call_app'
  railties (4.2.1) lib/rails/rack/logger.rb:20:in `block in call'
  activesupport (4.2.1) lib/active_support/tagged_logging.rb:68:in
`block in tagged'
  activesupport (4.2.1) lib/active_support/tagged_logging.rb:26:in
`tagged'
  activesupport (4.2.1) lib/active_support/tagged_logging.rb:68:in
`tagged'
  railties (4.2.1) lib/rails/rack/logger.rb:20:in `call'
  quiet_assets (1.1.0) lib/quiet_assets.rb:27:in
`call_with_quiet_assets'
  actionpack (4.2.1) lib/action_dispatch/middleware/request_id.rb:21:in
`call'
  rack (1.6.0) lib/rack/methodoverride.rb:22:in `call'
  rack (1.6.0) lib/rack/runtime.rb:18:in `call'
  activesupport (4.2.1)
lib/active_support/cache/strategy/local_cache_middleware.rb:28:in `call'
  rack (1.6.0) lib/rack/lock.rb:17:in `call'
  actionpack (4.2.1) lib/action_dispatch/middleware/static.rb:113:in
`call'
  rack (1.6.0) lib/rack/sendfile.rb:113:in `call'
  railties (4.2.1) lib/rails/engine.rb:518:in `call'
  railties (4.2.1) lib/rails/application.rb:164:in `call'
  rack (1.6.0) lib/rack/lock.rb:17:in `call'
  rack (1.6.0) lib/rack/content_length.rb:15:in `call'
  rack (1.6.0) lib/rack/handler/webrick.rb:89:in `service'
  /home/malware/.rvm/rubies/ruby-2.2.0/lib/ruby/2.2.0/webrick/httpserver.rb:138:in
`service'
  /home/malware/.rvm/rubies/ruby-2.2.0/lib/ruby/2.2.0/webrick/httpserver.rb:94:in
`run'
  /home/malware/.rvm/rubies/ruby-2.2.0/lib/ruby/2.2.0/webrick/server.rb:294:in
`block in start_thread'



Started POST "/__better_errors/c2aa3bfba6857017/variables" for 127.0.0.1
at 2015-04-15 12:14:32 +0530


My Development Log

The Error I'm Getting
Net::SMTPAuthenticationError at /users

530-5.5.1 Authentication Required.

/home/malware/.rvm/rubies/ruby-2.2.0/lib/ruby/2.2.0/net/smtp.rb

      end

    end

    def check_response(res)

      unless res.success?

        raise res.exception_class, res.message

      end

    end

    def check_continue(res)

      unless res.continue?


Using The Same Application i just changed secrets.yml file

development:
  admin_name: Name Of Admin(which i will create in sign up i guess)
  admin_email: Email Of Admin
  admin_password: 12345678
  email_provider_username: <%= ENV["GMAIL_USERNAME"] %>
  email_provider_password: <%= ENV["GMAIL_PASSWORD"] %>
  domain_name: example.com
  secret_key_base:
9a420e1037f4f16eb5211a9594b181ac5a62cdb38da0e83cdfd2a2f8983c4daa03f35c696eecdbd0a448d1a99fff461d25c8f00d47ebe0fa7b4df895b2ccfaa3

test:
  domain_name: example.com
  secret_key_base:
bf3f1cea7ec7732797917f14a65b33c287189cb968366f79dcb4bb5e8fed532bb4de3b404a35c452dab11813a6f422242453122fdc44bdbf589e81ca3e03c373

# Do not keep production secrets in the repository,
# instead read values from the environment.
production:
  admin_name: <%= ENV["ADMIN_NAME"] %>
  admin_email: <%= ENV["ADMIN_EMAIL"] %>
  admin_password: <%= ENV["ADMIN_PASSWORD"] %>
  email_provider_username: <%= ENV["GMAIL_USERNAME"] %>
  email_provider_password: <%= ENV["GMAIL_PASSWORD"] %>
  domain_name: <%= ENV["DOMAIN_NAME"] %>
  secret_key_base: <%= ENV["SECRET_KEY_BASE"] %>

It's Not letting me send email after sign-up as well as not letting me
signup as an admin plus after i sign-up using the name and email and
password defined in development i get errors.
Fde839db701c9efdfb1b30823b9a2cc8?d=identicon&s=25 Robby O'Connor (Guest)
on 2015-04-15 09:23
(Received via mailing list)
The answer to what happened is right there in your logs, read it.

On 04/15/2015 02:55 AM, Edward Maya wrote:
> Processing by VisitorsController#index as HTML
>    Rendered devise/registrations/new.html.erb within layouts/application
>
"authenticity_token"=>"/hlfWSuave2dv+n5BSXb/iXSAAfyG7swubt34y0ctADi3sFWXMmt8IwpZoYYn/i+vRpvXnEcFyJmdpCoacXWww==",
>    [1m[35mSQL (2.2ms)[0m  INSERT INTO "users" ("email",
>
/home/malware/.rvm/gems/ruby-2.2.0@finalproject/gems/devise-3.4.1/app/views/devise/mailer/confirmation_instructions.html.erb
> Message-ID: <552e08cab9fc7_715f61f23c6852d3@Unbeatable-Lord.mail>
> <p><a
>
href="http://localhost:3000/users/confirmation?confirmat...
> my account</a></p>
>
>    [1m[36m (0.7ms)[0m  [1mrollback transaction[0m
> Completed 500 Internal Server Error in 10379ms (ActiveRecord: 5.0ms)
>
> *Net::SMTPAuthenticationError - 530-5.5.1 Authentication Required. Learn
> more at*
> :
This is your problem.
Fde839db701c9efdfb1b30823b9a2cc8?d=identicon&s=25 Robby O'Connor (Guest)
on 2015-04-15 09:25
(Received via mailing list)
Also to add: if you encounter issues like this ALWAYS ALWAYS ALWAYS
check logs whether it be testing, production or development...it will
tell you what's wrong.
7ad6d6bd15d07e72f89a855c7f5199d7?d=identicon&s=25 Edward Maya (maya_badmash)
on 2015-04-15 09:31
Robby O'Connor wrote in post #1172066:
> Also to add: if you encounter issues like this ALWAYS ALWAYS ALWAYS
> check logs whether it be testing, production or development...it will
> tell you what's wrong.

I still don't get you. where m i wrong ?
if you could answer me keeping in mind as i'm a novice user :/
1a4ff0766a653c62e0dab34bacda9873?d=identicon&s=25 Norbert Melzer (Guest)
on 2015-04-15 10:03
(Received via mailing list)
There was an authentication error against the google servers. That's it.
Am 15.04.2015 09:31 schrieb "Edward Maya" <lists@ruby-forum.com>:
7ad6d6bd15d07e72f89a855c7f5199d7?d=identicon&s=25 Edward Maya (maya_badmash)
on 2015-04-15 10:12
Norbert Melzer wrote in post #1172069:
> There was an authentication error against the google servers. That's it.
> Am 15.04.2015 09:31 schrieb "Edward Maya" <lists@ruby-forum.com>:

And how m i supposed to resolve this ? any further guidence
1a4ff0766a653c62e0dab34bacda9873?d=identicon&s=25 Norbert Melzer (Guest)
on 2015-04-15 10:19
(Received via mailing list)
Proofread username and password, double check server settings, google a
tutorial about how to use activemailer with gmail.
Am 15.04.2015 10:12 schrieb "Edward Maya" <lists@ruby-forum.com>:
7ad6d6bd15d07e72f89a855c7f5199d7?d=identicon&s=25 Edward Maya (maya_badmash)
on 2015-04-15 11:15
Norbert Melzer wrote in post #1172071:
> Proofread username and password, double check server settings, google a
> tutorial about how to use activemailer with gmail.
> Am 15.04.2015 10:12 schrieb "Edward Maya" <lists@ruby-forum.com>:

i am doing google searching from yesterday and then i asked here :v

i have cloned this app
https://github.com/RailsApps/rails-devise-roles/

have a look at it
yesterday when it was working, when i sign up a new user and try to
access users after sign up then it gives error :access denied, so any
way to make a user admin ?

another one is today when i hit signup it is giving me error i described
before and the normal gmail smtp settings aren't working as you can see
in the development.rb and production.rb and in secrets.yml file
4c6bde00168d595053c09aac7e487f8e?d=identicon&s=25 Colin Law (Guest)
on 2015-04-15 23:42
(Received via mailing list)
On 15 April 2015 at 10:15, Edward Maya <lists@ruby-forum.com> wrote:
> have a look at it
> yesterday when it was working, when i sign up a new user and try to
> access users after sign up then it gives error :access denied, so any
> way to make a user admin ?
>
> another one is today when i hit signup it is giving me error i described
> before and the normal gmail smtp settings aren't working as you can see
> in the development.rb and production.rb and in secrets.yml file

Some advice, concentrate on one problem at a time when asking for
help.  By asking another two questions in the same thread you have
just complicated the situation and no-one will know which problem to
respond to.  So here concentrate on sorting your google authentication
problem.  To ask the other questions start new threads with
appropriate subject lines.   Also it is no good asking people to go
and look at an app you have cloned, no-one has the time for that.  You
must ask targeted questions about specific issues you are having and
show us the specific bit of code that you are having trouble with.

Colin
8f26f4a49ca22308908366608b78dfd1?d=identicon&s=25 Ron C. (ron_c)
on 2015-04-16 02:22
As a RoR novice myself, I can tell you that you are NOT doing your home
work before asking questions ... you are NOT putting in the necessary
time, patience and resolve required to find a solution for YOURSELF ...

However, in about 15 secs I found on the internet a possible hint to
what your problem is

http://stackoverflow.com/questions/4929680/setting...

Cheers
B51f0d8453e1edfe3839630ed7ffd16e?d=identicon&s=25 Cody Skidmore (cody_skidmore)
on 2015-04-16 03:45
(Received via mailing list)
I use devise with Google apps hosted email which requires ssl. I'll post
the configuration tomorrow.
7c30c7ba984a2a80633b308db37c1f8a?d=identicon&s=25 Sai Ch (sai_c)
on 2015-04-16 14:19
put this code in

config/environments/development.rb

  config.action_mailer.raise_delivery_errors = true
  config.action_mailer.default_url_options = { :host => 'localhost:3000'
}
  config.action_mailer.delivery_method = :smtp

 ActionMailer::Base.smtp_settings = {
:address              => "smtp.gmail.com",
:port                 => 587,
:domain               => "mail.gmail.com",
:user_name            => “youremail@gmail.com",
:password             => “gmail-password",
:authentication       => "plain",
:enable_starttls_auto => true
}
B51f0d8453e1edfe3839630ed7ffd16e?d=identicon&s=25 Cody Skidmore (cody_skidmore)
on 2015-04-16 15:01
(Received via mailing list)
The following snippets are a working example of setting up
ActionMailer/Devise using a domain email account hosted on Google Apps
with
Rails 4.2/Ruby 2.2.1. This is different than using regular Gmail account
which only requires you to go into the account settings and turn on
"Access
for less secure apps". This setting isn't available for the former. You
must use SSL instead.

From development.rb:
  # Devise configuration settings
  config.action_mailer.default_url_options = { :host =>
'localhost:3000'}
  config.action_mailer.delivery_method = :smtp
  config.action_mailer.perform_deliveries = true

From setup_mail.rb:
ActionMailer::Base.smtp_settings = {   :address        =>
'smtp.gmail.com',
  :port           => '465',   :authentication => 'plain',   :user_name
 => 'example@example.com',   :password       => 'yourpassword',
:domain
      => 'yourdomain@example.com',   :ssl            => true }

This is a great video tutorial on setting up devise:
https://www.youtube.com/watch?v=YnGuALpJN1M

Respectfully,

Cody Skidmore
Fde839db701c9efdfb1b30823b9a2cc8?d=identicon&s=25 Robby O'Connor (Guest)
on 2015-04-18 15:32
(Received via mailing list)
I would also advise using mailcatcher in development...you don't need
gmail in development -- only maybe when you deploy to test production
settings...
B51f0d8453e1edfe3839630ed7ffd16e?d=identicon&s=25 Cody Skidmore (cody_skidmore)
on 2015-04-18 15:56
(Received via mailing list)
Nice tip. Thanks.
This topic is locked and can not be replied to.