In `block in <top (required)>': uninitialized const

Chce skonfigurowac Action Mailer w pliku development.rb ale postepujac zgodnie z tym railscastem: http://railscasts.com/episodes/85-yaml-configuration-file/ dostaje blad przy uruchomieniu aplikacji:

development.rb:48:in `block in <top (required)>': uninitialized constant EMAIL_CONFIG (NameError)

plik development.rb

#Action Mailer config.action_mailer.delivery_method = :smtp config.action_mailer.smtp_settings = { :address => "smtp.gmail.com", :port => 587, :domain => "gmail.com", :user_name => EMAIL_CONFIG['login'], :password => EMAIL_CONFIG['password'], :authentication => "plain", :enable_starttls_auto => true }
plik initializers/load_email_config.rb

EMAIL_CONFIG = YAML.load_file("#{Rails.root}/config/email.yml")[Rails.env]

plik config/email.yml

development: login: password
Czemu stala EMAIL_CONFIG nie jest widoczna w pliku development.rb ?

OK problem rozwiazany, postapilem tak jak w: http://railscasts.com/episodes/206-action-mailer-in-rails-3/

w pliku setup_mail.rb

[code]#load email config
EMAIL_CONFIG = YAML.load_file("#{Rails.root}/config/email.yml")[Rails.env]

#Action Mailer
ActionMailer::Base.delivery_method = :smtp
ActionMailer::Base.smtp_settings = {
:address => “smtp.gmail.com”,
:port => 587,
:domain => “gmail.com”,
:user_name => EMAIL_CONFIG[‘login’],
:password => EMAIL_CONFIG[‘password’],
:authentication => “plain”,
:enable_starttls_auto => true
}
ActionMailer::Base.default_url_options[:host] = “localhost:3000”[/code]