Saturday, 31 August 2013

The rails $RAILS_ENV.rb file

The rails $RAILS_ENV.rb file

I'm following this tutorial and I don't really understand what this means:
Action Mailer Configuration for Gmail As Action Mailer now uses the Mail
gem, this becomes as simple as adding to your
config/environments/$RAILS_ENV.rb file:
config.action_mailer.delivery_method = :smtp
config.action_mailer.smtp_settings = {
address: 'smtp.gmail.com',
port: 587,
domain: 'example.com',
user_name: '<username>',
password: '<password>',
authentication: 'plain',
enable_starttls_auto: true }
...but I don't have a $RAILS_ENV.rb file. Do I simply add one to my
environments directory, and paste in and append the above information?
Now, I've had a bit of a hiatus from rails, and I've forgotten quite a lot :(
Could someone please explain just what happens inside my environments
directory? Quite detailed, please. I really don't know what it does at
all, so I'd like to know where these parameters are going.

No comments:

Post a Comment