Setting up mail in OpenConferenceWare

57 views
Skip to first unread message

Gretchen Kuwahara

unread,
Nov 14, 2014, 9:23:37 AM11/14/14
to openconfe...@googlegroups.com
Hello,
We are trying to set up the email part of this program and I'm having a hard time figuring out what needs to be configured to get it to work.  I get an error that "Email setting must be set in the 'config/secrets.yml'" but there is no documentation what settings must be set.  We are including the mail and action mail gems.  We know that sendmail works on the server because I am able to create/send an email with a simple perl script.  Anyone else have email working and wish to share their configuration with us?

To replicate the error that I am getting do the following:

Log in as an administrator.
Under the Manage menu select -Bulk Edit proposals
Select a proposal that has been "accepted"
Click on the "Send acceptance email to checked speakers"
Click OK on the pop-up box confirming you wish to send the email.
I get the following error:

ArgumentError in OpenConferenceWare::Manage::EventsController#notify_speakers

Email settings must be set in 'config/secrets.yml'

Rails.root: /ocw/<group>

open_conference_ware (1.0.0.pre3) app/mailers/open_conference_ware/speaker_mailer.rb:28:in `speaker_email'
open_conference_ware (1.0.0.pre3) app/mailers/open_conference_ware/speaker_mailer.rb:44:in `speaker_accepted_email'
actionpack (4.0.2) lib/abstract_controller/base.rb:189:in `process_action'
actionpack (4.0.2) lib/abstract_controller/callbacks.rb:18:in `block in process_action'
activesupport (4.0.2) lib/active_support/callbacks.rb:373:in `_run__3273842257573057046__process_action__callbacks'
activesupport (4.0.2) lib/active_support/callbacks.rb:80:in `run_callbacks'
actionpack (4.0.2) lib/abstract_controller/callbacks.rb:17:in `process_action'
actionpack (4.0.2) lib/abstract_controller/base.rb:136:in `process'
actionpack (4.0.2) lib/abstract_controller/rendering.rb:44:in `process'
actionmailer (4.0.2) lib/action_mailer/base.rb:503:in `process'
actionmailer (4.0.2) lib/action_mailer/base.rb:497:in `initialize'
actionmailer (4.0.2) lib/action_mailer/base.rb:480:in `new'
actionmailer (4.0.2) lib/action_mailer/base.rb:480:in `method_missing'
open_conference_ware (1.0.0.pre3) app/models/open_conference_ware/proposal.rb:578:in `notify_accepted_speakers'
open_conference_ware (1.0.0.pre3) app/controllers/open_conference_ware/manage/events_controller.rb:115:in `block in notify_speakers'
open_conference_ware (1.0.0.pre3) app/controllers/open_conference_ware/manage/events_controller.rb:110:in `each'
open_conference_ware (1.0.0.pre3) app/controllers/open_conference_ware/manage/events_controller.rb:110:in `notify_speakers'
actionpack (4.0.2) lib/action_controller/metal/implicit_render.rb:4:in `send_action'
actionpack (4.0.2) lib/abstract_controller/base.rb:189:in `process_action'
actionpack (4.0.2) lib/action_controller/metal/rendering.rb:10:in `process_action'
actionpack (4.0.2) lib/abstract_controller/callbacks.rb:18:in `block in process_action'
activesupport (4.0.2) lib/active_support/callbacks.rb:493:in `_run__1400211945684939611__process_action__callbacks'
activesupport (4.0.2) lib/active_support/callbacks.rb:80:in `run_callbacks'
actionpack (4.0.2) lib/abstract_controller/callbacks.rb:17:in `process_action'
actionpack (4.0.2) lib/action_controller/metal/rescue.rb:29:in `process_action'
actionpack (4.0.2) lib/action_controller/metal/instrumentation.rb:31:in `block in process_action'
activesupport (4.0.2) lib/active_support/notifications.rb:159:in `block in instrument'
activesupport (4.0.2) lib/active_support/notifications/instrumenter.rb:20:in `instrument'
activesupport (4.0.2) lib/active_support/notifications.rb:159:in `instrument'
actionpack (4.0.2) lib/action_controller/metal/instrumentation.rb:30:in `process_action'
actionpack (4.0.2) lib/action_controller/metal/params_wrapper.rb:245:in `process_action'
activerecord (4.0.2) lib/active_record/railties/controller_runtime.rb:18:in `process_action'
actionpack (4.0.2) lib/abstract_controller/base.rb:136:in `process'
actionpack (4.0.2) lib/abstract_controller/rendering.rb:44:in `process'
actionpack (4.0.2) lib/action_controller/metal.rb:195:in `dispatch'
actionpack (4.0.2) lib/action_controller/metal/rack_delegation.rb:13:in `dispatch'
actionpack (4.0.2) lib/action_controller/metal.rb:231:in `block in action'
actionpack (4.0.2) lib/action_dispatch/routing/route_set.rb:80:in `call'
actionpack (4.0.2) lib/action_dispatch/routing/route_set.rb:80:in `dispatch'
actionpack (4.0.2) lib/action_dispatch/routing/route_set.rb:48:in `call'
actionpack (4.0.2) lib/action_dispatch/journey/router.rb:71:in `block in call'
actionpack (4.0.2) lib/action_dispatch/journey/router.rb:59:in `each'
actionpack (4.0.2) lib/action_dispatch/journey/router.rb:59:in `call'
actionpack (4.0.2) lib/action_dispatch/routing/route_set.rb:680:in `call'
railties (4.0.2) lib/rails/engine.rb:511:in `call'
railties (4.0.2) lib/rails/railtie/configurable.rb:30:in `method_missing'
actionpack (4.0.2) lib/action_dispatch/journey/router.rb:71:in `block in call'
actionpack (4.0.2) lib/action_dispatch/journey/router.rb:59:in `each'
actionpack (4.0.2) lib/action_dispatch/journey/router.rb:59:in `call'
actionpack (4.0.2) lib/action_dispatch/routing/route_set.rb:680:in `call'
omniauth (1.1.4) lib/omniauth/strategy.rb:184:in `call!'
omniauth (1.1.4) lib/omniauth/strategy.rb:164:in `call'
omniauth (1.1.4) lib/omniauth/builder.rb:49:in `call'
rack (1.5.2) lib/rack/etag.rb:23:in `call'
rack (1.5.2) lib/rack/conditionalget.rb:35:in `call'
rack (1.5.2) lib/rack/head.rb:11:in `call'
actionpack (4.0.2) lib/action_dispatch/middleware/params_parser.rb:27:in `call'
actionpack (4.0.2) lib/action_dispatch/middleware/flash.rb:241:in `call'
rack (1.5.2) lib/rack/session/abstract/id.rb:225:in `context'
rack (1.5.2) lib/rack/session/abstract/id.rb:220:in `call'
actionpack (4.0.2) lib/action_dispatch/middleware/cookies.rb:486:in `call'
activerecord (4.0.2) lib/active_record/query_cache.rb:36:in `call'
activerecord (4.0.2) lib/active_record/connection_adapters/abstract/connection_pool.rb:626:in `call'
activerecord (4.0.2) lib/active_record/migration.rb:369:in `call'
actionpack (4.0.2) lib/action_dispatch/middleware/callbacks.rb:29:in `block in call'
activesupport (4.0.2) lib/active_support/callbacks.rb:373:in `_run__4402860326993529552__call__callbacks'
activesupport (4.0.2) lib/active_support/callbacks.rb:80:in `run_callbacks'
actionpack (4.0.2) lib/action_dispatch/middleware/callbacks.rb:27:in `call'
actionpack (4.0.2) lib/action_dispatch/middleware/reloader.rb:64:in `call'
actionpack (4.0.2) lib/action_dispatch/middleware/remote_ip.rb:76:in `call'
actionpack (4.0.2) lib/action_dispatch/middleware/debug_exceptions.rb:17:in `call'
actionpack (4.0.2) lib/action_dispatch/middleware/show_exceptions.rb:30:in `call'
railties (4.0.2) lib/rails/rack/logger.rb:38:in `call_app'
railties (4.0.2) lib/rails/rack/logger.rb:20:in `block in call'
activesupport (4.0.2) lib/active_support/tagged_logging.rb:67:in `block in tagged'
activesupport (4.0.2) lib/active_support/tagged_logging.rb:25:in `tagged'
activesupport (4.0.2) lib/active_support/tagged_logging.rb:67:in `tagged'
railties (4.0.2) lib/rails/rack/logger.rb:20:in `call'
actionpack (4.0.2) lib/action_dispatch/middleware/request_id.rb:21:in `call'
rack (1.5.2) lib/rack/methodoverride.rb:21:in `call'
rack (1.5.2) lib/rack/runtime.rb:17:in `call'
activesupport (4.0.2) lib/active_support/cache/strategy/local_cache.rb:83:in `call'
rack (1.5.2) lib/rack/lock.rb:17:in `call'
actionpack (4.0.2) lib/action_dispatch/middleware/static.rb:64:in `call'
rack (1.5.2) lib/rack/sendfile.rb:112:in `call'
railties (4.0.2) lib/rails/engine.rb:511:in `call'
railties (4.0.2) lib/rails/application.rb:97:in `call'
rack (1.5.2) lib/rack/lock.rb:17:in `call'
rack (1.5.2) lib/rack/content_length.rb:14:in `call'
rack (1.5.2) lib/rack/handler/webrick.rb:60:in `service'
/usr/local/rvm/rubies/ruby-1.9.3-p550/lib/ruby/1.9.1/webrick/httpserver.rb:138:in `service'
/usr/local/rvm/rubies/ruby-1.9.3-p550/lib/ruby/1.9.1/webrick/httpserver.rb:94:in `run'
/usr/local/rvm/rubies/ruby-1.9.3-p550/lib/ruby/1.9.1/webrick/server.rb:191:in `block in start_thread'

Any assistance would be helpful.  --Gretchen

rei...@gmail.com

unread,
Nov 17, 2014, 12:30:13 PM11/17/14
to openconfe...@googlegroups.com
It looks like the message you’re hitting is a bit of a holdover from our old configuration system. This is being tracked in https://github.com/osbridge/openconferenceware/issues/86, but there’s a fairly easy workaround:

1. Configure ActionMailer in your config/environments/*.rb files, per http://guides.rubyonrails.org/action_mailer_basics.html#action-mailer-configuration

2. Edit config/initializers/01_open_conference_ware.rb to include the config that OCW expects to see:

# Set the default address from which to send outgoing mail
config.default_from_address = "y...@yourdomain.org"

# Set an address to BCC on all outbound communication (optional)
config.default_bcc_address = "y...@yourdomain.org"

# Fulfill the expectations of SpeakerMailer.configured?
config.email = {
  "action_mailer" = {"enabled" => true}
  "default_from_address" = config.default_from_address
}

Best,
Reid
--
You received this message because you are subscribed to the Google Groups "openconferenceware" group.
To unsubscribe from this group and stop receiving emails from it, send an email to openconferencew...@googlegroups.com.
To post to this group, send email to openconfe...@googlegroups.com.
Visit this group at http://groups.google.com/group/openconferenceware.
For more options, visit https://groups.google.com/d/optout.
Message has been deleted

Gretchen Kuwahara

unread,
Nov 17, 2014, 3:55:24 PM11/17/14
to openconfe...@googlegroups.com
Thanks Reid,  

When I add those settings to my 01_open_conference_ware.rb and run: bin/rails generate open_conference_ware:install

[<user>@<server> <server>]# bin/rails generate open_conference_ware:install
/usr/local/rvm/gems/ruby-1.9.3-p550/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:223:in `load': /ocw/<server>/config/initializers/01_open_conference_ware.rb:142: syntax error, unexpected '=', expecting tASSOC (SyntaxError)
  "action_mailer" = {"enabled" => true}
                   ^
/ocw/<server>/config/initializers/01_open_conference_ware.rb:143: syntax error, unexpected '=', expecting keyword_end
  "default_from_address" = config.default_from_address
                          ^
/ocw/<server>/config/initializers/01_open_conference_ware.rb:144: syntax error, unexpected '}', expecting keyword_end
from /usr/local/rvm/gems/ruby-1.9.3-p550/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:223:in `block in load'
from /usr/local/rvm/gems/ruby-1.9.3-p550/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:214:in `load_dependency'
from /usr/local/rvm/gems/ruby-1.9.3-p550/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:223:in `load'
from /usr/local/rvm/gems/ruby-1.9.3-p550/gems/railties-4.0.2/lib/rails/engine.rb:609:in `block (2 levels) in <class:Engine>'
from /usr/local/rvm/gems/ruby-1.9.3-p550/gems/railties-4.0.2/lib/rails/engine.rb:608:in `each'
from /usr/local/rvm/gems/ruby-1.9.3-p550/gems/railties-4.0.2/lib/rails/engine.rb:608:in `block in <class:Engine>'
from /usr/local/rvm/gems/ruby-1.9.3-p550/gems/railties-4.0.2/lib/rails/initializable.rb:30:in `instance_exec'
from /usr/local/rvm/gems/ruby-1.9.3-p550/gems/railties-4.0.2/lib/rails/initializable.rb:30:in `run'
from /usr/local/rvm/gems/ruby-1.9.3-p550/gems/railties-4.0.2/lib/rails/initializable.rb:55:in `block in run_initializers'
from /usr/local/rvm/rubies/ruby-1.9.3-p550/lib/ruby/1.9.1/tsort.rb:150:in `block in tsort_each'
from /usr/local/rvm/rubies/ruby-1.9.3-p550/lib/ruby/1.9.1/tsort.rb:183:in `block (2 levels) in each_strongly_connected_component'
from /usr/local/rvm/rubies/ruby-1.9.3-p550/lib/ruby/1.9.1/tsort.rb:210:in `block (2 levels) in each_strongly_connected_component_from'
from /usr/local/rvm/rubies/ruby-1.9.3-p550/lib/ruby/1.9.1/tsort.rb:219:in `each_strongly_connected_component_from'
from /usr/local/rvm/rubies/ruby-1.9.3-p550/lib/ruby/1.9.1/tsort.rb:209:in `block in each_strongly_connected_component_from'
from /usr/local/rvm/gems/ruby-1.9.3-p550/gems/railties-4.0.2/lib/rails/initializable.rb:44:in `each'
from /usr/local/rvm/gems/ruby-1.9.3-p550/gems/railties-4.0.2/lib/rails/initializable.rb:44:in `tsort_each_child'
from /usr/local/rvm/rubies/ruby-1.9.3-p550/lib/ruby/1.9.1/tsort.rb:203:in `each_strongly_connected_component_from'
from /usr/local/rvm/rubies/ruby-1.9.3-p550/lib/ruby/1.9.1/tsort.rb:182:in `block in each_strongly_connected_component'
from /usr/local/rvm/rubies/ruby-1.9.3-p550/lib/ruby/1.9.1/tsort.rb:180:in `each'
from /usr/local/rvm/rubies/ruby-1.9.3-p550/lib/ruby/1.9.1/tsort.rb:180:in `each_strongly_connected_component'
from /usr/local/rvm/rubies/ruby-1.9.3-p550/lib/ruby/1.9.1/tsort.rb:148:in `tsort_each'
from /usr/local/rvm/gems/ruby-1.9.3-p550/gems/railties-4.0.2/lib/rails/initializable.rb:54:in `run_initializers'
from /usr/local/rvm/gems/ruby-1.9.3-p550/gems/railties-4.0.2/lib/rails/application.rb:215:in `initialize!'
from /usr/local/rvm/gems/ruby-1.9.3-p550/gems/railties-4.0.2/lib/rails/railtie/configurable.rb:30:in `method_missing'
from /ocw/<server>/config/environment.rb:5:in `<top (required)>'
from /usr/local/rvm/gems/ruby-1.9.3-p550/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:229:in `require'
from /usr/local/rvm/gems/ruby-1.9.3-p550/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:229:in `block in require'
from /usr/local/rvm/gems/ruby-1.9.3-p550/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:214:in `load_dependency'
from /usr/local/rvm/gems/ruby-1.9.3-p550/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:229:in `require'
from /usr/local/rvm/gems/ruby-1.9.3-p550/gems/railties-4.0.2/lib/rails/application.rb:189:in `require_environment!'
from /usr/local/rvm/gems/ruby-1.9.3-p550/gems/railties-4.0.2/lib/rails/commands.rb:44:in `<top (required)>'
from bin/rails:4:in `require'
from bin/rails:4:in `<main>'

Thanks again!  --Gretchen 
 

rei...@gmail.com

unread,
Nov 17, 2014, 4:28:48 PM11/17/14
to openconfe...@googlegroups.com
Oops. That would be a typo in my example.

Try it with the line:

  "action_mailer" = {"enabled" => true}

changed to:

  "action_mailer” => {"enabled" => true}
--

Gretchen Kuwahara

unread,
Nov 18, 2014, 1:35:52 PM11/18/14
to openconfe...@googlegroups.com
Thanks for you assistance, I finally go to work.  For the record, this is how the email configuration in the 01_open_conference_ware.rb file should look like:


# Fulfill the expectations of SpeakerMailer.configured?
config.email = {
  "action_mailer" => {"enabled" => true},
  "default_from_address" => config.default_from_address
}
 

Note the => and the ,

--Gretchen
Reply all
Reply to author
Forward
0 new messages