I''m having a problem with ActionMailer on Rails 2.0.2. app/config/environment.yml ---------------------- ActionMailer::Base.delivery_method = :smtp ActionMailer::Base.server_settings = { :address => "my.server.address.com", :port => 25, :domain => "my.server.domain.com", :authentication => :login, :user_name => "test_mailer-iquZ65Jdg7U7Lhrc+Zsf1FaTQe2KTcn/@public.gmane.org", :password => "my_password" } ---------------------- *** LOCAL GEMS *** actionmailer (2.0.2) actionpack (2.0.2) activerecord (2.0.2) activeresource (2.0.2) activesupport (2.0.2) fxri (0.3.6) fxruby (1.6.12) hpricot (0.6) log4r (1.0.5) rails (2.0.2) rake (0.7.3) rubygems-update (1.0.1) sources (0.0.1) win32-api (1.0.4) win32-clipboard (0.4.3) win32-dir (0.3.2) win32-eventlog (0.4.6) win32-file (0.5.4) win32-file-stat (1.2.7) win32-process (0.5.3) win32-sapi (0.1.4) win32-sound (0.4.1) windows-api (0.2.0) windows-pr (0.7.2) ---------------------- And here''s my output: ---------------------- => Booting WEBrick... C:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/active_support/ dependencies.rb:266:in `load_missing_constant'': uninitialized constant ActionMailer (NameError) from C:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/ active_support/dependencies.rb:453:in `const_missing'' from C:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/ active_support/dependencies.rb:465:in `const_missing'' from C:/InstantRails/rails_apps/rails_space/config/ environment.rb:64 from C:/ruby/lib/ruby/gems/1.8/gems/rails-2.0.2/lib/ initializer.rb:47:in `run'' from C:/InstantRails/rails_apps/rails_space/config/ environment.rb:13 from C:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb: 27:in `gem_original_require'' from C:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb: 27:in `require'' from C:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/ active_support/dependencies.rb:496:in `require'' ... 8 levels... from C:/ruby/lib/ruby/gems/1.8/gems/rails-2.0.2/lib/commands/ server.rb:39 from C:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb: 27:in `gem_original_require'' from C:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb: 27:in `require'' from script/server:3 ---------------------- Any assistance would be greatly appreciated. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
I would guess that you have this code in the wrong place:> ActionMailer::Base.delivery_method = :smtp > ActionMailer::Base.server_settings = { > :address => "my.server.address.com", > :port => 25, > :domain => "my.server.domain.com", > :authentication => :login, > :user_name => "test_mailer-iquZ65Jdg7U7Lhrc+Zsf1FaTQe2KTcn/@public.gmane.org", > :password => "my_password" > }Try moving it out of the "Rails::Initializer.run do |config|" in the environment.rb file. Put it at the bottom of the file, outside of that block. You''re trying to refer to ActionMailer before the Initializer has had a chance to load it for you. By moving the config code to the bottom of the file, or (even better) into your development.rb & production.rb files, you won''t call ActionMailer until after it''s been loaded. -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
I appreciate your reply. I moved it out of the block, and it gave me the same error. I also moved it to my environment/development.yml file and it still did not work. I do see what you''re saying though, that it''s trying to call it before it''s initialized. Is there any other place I could put it that would ensure that it gets called after it has initialized ActionMailer? Thanks On Feb 29, 12:15 pm, Brent Miller <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> I would guess that you have this code in the wrong place: > > > ActionMailer::Base.delivery_method = :smtp > > ActionMailer::Base.server_settings = { > > :address => "my.server.address.com", > > :port => 25, > > :domain => "my.server.domain.com", > > :authentication => :login, > > :user_name => "test_mai...-iquZ65Jdg7U7Lhrc+Zsf1FaTQe2KTcn/@public.gmane.org", > > :password => "my_password" > > } > > Try moving it out of the "Rails::Initializer.run do |config|" in the > environment.rb file. Put it at the bottom of the file, outside of that > block. You''re trying to refer to ActionMailer before the Initializer has > had a chance to load it for you. By moving the config code to the > bottom of the file, or (even better) into your development.rb & > production.rb files, you won''t call ActionMailer until after it''s been > loaded. > -- > Posted viahttp://www.ruby-forum.com/.--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Grrr... The only other thing I can think of is that, in Rails 2+, there''s the following line in the environment.rb file: # config.frameworks -= [ :active_record, :active_resource, :action_mailer ] It''s usually commented out. If you''ve got it activated, and it contains :action_mailer, then Rails won''t load ActionMailer at startup. Other than that, it might a weird InstantRails issue, and I don''t have enough experience to help you there. :( Good luck! -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
I made sure the line was commented out, as it was by default. Thanks for your help On Feb 29, 11:05 pm, Brent Miller <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> Grrr... > > The only other thing I can think of is that, in Rails 2+, there''s the > following line in the environment.rb file: > > # config.frameworks -= [ :active_record, :active_resource, > :action_mailer ] > > It''s usually commented out. If you''ve got it activated, and it contains > :action_mailer, then Rails won''t load ActionMailer at startup. Other > than that, it might a weird InstantRails issue, and I don''t have enough > experience to help you there. :( > > Good luck! > -- > Posted viahttp://www.ruby-forum.com/.--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
I''m having the same issue, trying to setup mail first time. Do you have any solution yet ? Here is my stacktrace, C:/projects/Sample/config/environments/development.rb:23:in `load_environment'': undefined local variable or method `smtp'' for #<Rails::Initializer:0x2b01740> (NameError) from C:/ruby/lib/ruby/gems/1.8/gems/rails-2.0.2/lib/ initializer.rb:206:in `load_environment'' Any help will be appreciated. Thanks. On 1 Mar, 11:51, Jonathon <t3hpwn...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> I made sure the line was commented out, as it was by default. > > Thanks for your help > > On Feb 29, 11:05 pm, Brent Miller <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> > wrote: > > > Grrr... > > > The only other thing I can think of is that, in Rails 2+, there''s the > > following line in the environment.rb file: > > > # config.frameworks -= [ :active_record, :active_resource, > > :action_mailer ] > > > It''s usually commented out. If you''ve got it activated, and it contains > > :action_mailer, then Rails won''t load ActionMailer at startup. Other > > than that, it might a weird InstantRails issue, and I don''t have enough > > experience to help you there. :( > > > Good luck! > > -- > > Posted viahttp://www.ruby-forum.com/.--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Hi guys, In Rails 2.0 you should put configuration into their own specific files in the initializers/ directory. Create a action_mailer.rb file in initializers/ and then specify your ActionMailer settings within. Rails 2.0 loads all files found in the initializers/ directory when the framework initializes. By the way, if you are sending your mail from an smtp host other than your deploy machine, specify the settings as follows: ActionMailer::Base.delivery_method = :smtp ActionMailer::Base.server_settings = { :address => "my.server.address.com", # => EXTERNAL SMTP HOST :port => 25, :domain => "my.server.domain.com", :authentication => :login, :user_name => "test_mailer-iquZ65Jdg7U7Lhrc+Zsf1FaTQe2KTcn/@public.gmane.org", :password => "my_password" } But if your deploy machine is doing the smtp work then make sure you specify localhost as the address, like so: ActionMailer::Base.delivery_method = :smtp ActionMailer::Base.server_settings = { :address => "localhost <http://my.server.address.com/>", # => HERE :port => 25, :domain => "my.server.domain.com", :authentication => :login, :user_name => "test_mailer-iquZ65Jdg7U7Lhrc+Zsf1FaTQe2KTcn/@public.gmane.org", :password => "my_password" } Hopefully this may solve your ActionMailer woes... Maruis Marais Freelance Software Developer Email: maruis-kGM0oXzJM5p02iOg2JU2CQ@public.gmane.org maruis.marais-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org Web: http://www.exceptionz.com Blog: http://exceptionz.wordpress.com Tel: +64 (0) 9 815 9273 (home) +64 (21) 736 070 (mobile) On Mon, Mar 17, 2008 at 3:08 PM, vimal <akvimal-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > I''m having the same issue, trying to setup mail first time. Do you > have any solution yet ? > > Here is my stacktrace, > > C:/projects/Sample/config/environments/development.rb:23:in > `load_environment'': undefined local variable or method `smtp'' for > #<Rails::Initializer:0x2b01740> (NameError) > > from C:/ruby/lib/ruby/gems/1.8/gems/rails-2.0.2/lib/ > initializer.rb:206:in `load_environment'' > > Any help will be appreciated. > > Thanks. > > On 1 Mar, 11:51, Jonathon <t3hpwn...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > I made sure the line was commented out, as it was by default. > > > > Thanks for your help > > > > On Feb 29, 11:05 pm, Brent Miller <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> > > wrote: > > > > > Grrr... > > > > > The only other thing I can think of is that, in Rails 2+, there''s the > > > following line in the environment.rb file: > > > > > # config.frameworks -= [ :active_record, :active_resource, > > > :action_mailer ] > > > > > It''s usually commented out. If you''ve got it activated, and it > contains > > > :action_mailer, then Rails won''t load ActionMailer at startup. Other > > > than that, it might a weird InstantRails issue, and I don''t have > enough > > > experience to help you there. :( > > > > > Good luck! > > > -- > > > Posted viahttp://www.ruby-forum.com/. > > >-- Regards, Maruis Marais Freelance Software Developer Email: maruis-kGM0oXzJM5p02iOg2JU2CQ@public.gmane.org Web: http://www.exceptionz.com We(blog): http://exceptionz.wordpress.com Tel: +64 (0) 9 815 9273 (home) +64 (21) 736 070 (mobile) --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Jonathon Davis-2 wrote:> > > I''m having a problem with ActionMailer on Rails 2.0.2. > > app/config/environment.yml > > ---------------------- > > ActionMailer::Base.delivery_method = :smtp > ActionMailer::Base.server_settings = { > :address => "my.server.address.com", > :port => 25, > :domain => "my.server.domain.com", > :authentication => :login, > :user_name => "test_mailer-iquZ65Jdg7U7Lhrc+Zsf1FaTQe2KTcn/@public.gmane.org", > :password => "my_password" > } > > And here''s my output: > > => Booting WEBrick... > C:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/active_support/ > dependencies.rb:266:in `load_missing_constant'': uninitialized constant > ActionMailer (NameError) > from C:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/ > active_support/dependencies.rb:453:in `const_missing'' > from C:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/ > active_support/dependencies.rb:465:in `const_missing'' > from C:/InstantRails/rails_apps/rails_space/config/ > environment.rb:64 > from C:/ruby/lib/ruby/gems/1.8/gems/rails-2.0.2/lib/ > initializer.rb:47:in `run'' > from C:/InstantRails/rails_apps/rails_space/config/ > environment.rb:13 > from C:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb: > 27:in `gem_original_require'' > from C:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb: > 27:in `require'' > from C:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/ > active_support/dependencies.rb:496:in `require'' > ... 8 levels... > from C:/ruby/lib/ruby/gems/1.8/gems/rails-2.0.2/lib/commands/ > server.rb:39 > from C:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb: > 27:in `gem_original_require'' > from C:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb: > 27:in `require'' > from script/server:3 > Any assistance would be greatly appreciated. > >Hey guys, I had this problem as well, I searched around a bit in the base.rb(X:\ruby\libs\ruby\gems\1.8\gems\actionmailer-2.0.2\lib\action_mailer\base.rb) and found the problem(for me anyhow). Instead of "ActionMailer::Base.server_settings = { .. ect .." they have it defined as "ActionMailer::Base.smtp_settings = { .. ect .." to define our smtp servers parameters. Taken directly from base.rb: # * <tt>smtp_settings</tt> - Allows detailed configuration for :smtp delivery method: # * <tt>:address</tt> Allows you to use a remote mail server. Just change it from its default "localhost" setting. # * <tt>:port</tt> On the off chance that your mail server doesn''t run on port 25, you can change it. # * <tt>:domain</tt> If you need to specify a HELO domain, you can do it here. # * <tt>:user_name</tt> If your mail server requires authentication, set the username in this setting. # * <tt>:password</tt> If your mail server requires authentication, set the password in this setting. # * <tt>:authentication</tt> If your mail server requires authentication, you need to specify the authentication type here. As for where to place it definitely create it it''s own file in the initializers directory with your connection info, and not at the end of the environment.rb (\yourapp\config\initializers\action_mailer.rb) Here is what the file(action_mailer.rb) should look like: ActionMailer::Base.delivery_method = :smtp ActionMailer::Base.smtp_settings = { :address => "localhost", # or an external ip if your using a remote smtp :port => 25, :domain => "domainnamehere", :authentication => :login, :user_name => "username here", :password => "passwordhere" } Cheers, Ziggah -- View this message in context: http://www.nabble.com/ActionMailer-2.0.2-NameError-tp15763436p16145138.html Sent from the RubyOnRails Users mailing list archive at Nabble.com. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
I have put the ActionMailer settings code in the end of config/environment.rb file. I am in Forget password option and want to mail user''s credentials to his mail address but when i click the button, it shows me the following error and mail is not sent: Net::SMTPAuthenticationError in SessionsController#create 502 unimplemented (#5.5.1) RAILS_ROOT: C:/work/2phone Application Trace | Framework Trace | Full Trace c:/ruby/lib/ruby/1.8/net/smtp.rb:577:in `auth_plain'' c:/ruby/lib/ruby/1.8/net/smtp.rb:571:in `__send__'' c:/ruby/lib/ruby/1.8/net/smtp.rb:571:in `authenticate'' c:/ruby/lib/ruby/1.8/net/smtp.rb:411:in `do_start'' c:/ruby/lib/ruby/1.8/net/smtp.rb:378:in `start'' c:/ruby/lib/ruby/1.8/net/smtp.rb:316:in `start'' c:/ruby/lib/ruby/gems/1.8/gems/actionmailer-2.0.2/lib/action_mailer/base.rb:586:in `perform_delivery_smtp'' c:/ruby/lib/ruby/gems/1.8/gems/actionmailer-2.0.2/lib/action_mailer/base.rb:469:in `__send__'' c:/ruby/lib/ruby/gems/1.8/gems/actionmailer-2.0.2/lib/action_mailer/base.rb:469:in `deliver!'' c:/ruby/lib/ruby/gems/1.8/gems/actionmailer-2.0.2/lib/action_mailer/base.rb:352:in `method_missing'' app/controllers/sessions_controller.rb:44:in `forgetpassword'' app/controllers/sessions_controller.rb:22:in `create'' -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
I have put the ActionMailer settings code in the end of config/environment.rb file. I am in Forget password option and want to mail user''s credentials to his mail address but when i click the button, it shows me the following error and mail is not sent: Net::SMTPAuthenticationError in SessionsController#create 502 unimplemented (#5.5.1) RAILS_ROOT: C:/work/2phone Application Trace | Framework Trace | Full Trace c:/ruby/lib/ruby/1.8/net/smtp.rb:577:in `auth_plain'' c:/ruby/lib/ruby/1.8/net/smtp.rb:571:in `__send__'' c:/ruby/lib/ruby/1.8/net/smtp.rb:571:in `authenticate'' c:/ruby/lib/ruby/1.8/net/smtp.rb:411:in `do_start'' c:/ruby/lib/ruby/1.8/net/smtp.rb:378:in `start'' c:/ruby/lib/ruby/1.8/net/smtp.rb:316:in `start'' c:/ruby/lib/ruby/gems/1.8/gems/actionmailer-2.0.2/lib/action_mailer/base.rb:586:in `perform_delivery_smtp'' c:/ruby/lib/ruby/gems/1.8/gems/actionmailer-2.0.2/lib/action_mailer/base.rb:469:in `__send__'' c:/ruby/lib/ruby/gems/1.8/gems/actionmailer-2.0.2/lib/action_mailer/base.rb:469:in `deliver!'' c:/ruby/lib/ruby/gems/1.8/gems/actionmailer-2.0.2/lib/action_mailer/base.rb:352:in `method_missing'' app/controllers/sessions_controller.rb:44:in `forgetpassword'' app/controllers/sessions_controller.rb:22:in `create'' -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Shikha Sharma wrote: | I have put the ActionMailer settings code in the end of | config/environment.rb file. I am in Forget password option and want to | mail user''s credentials to his mail address but when i click the button, Storing passwords as plaintext is bad. Reset the password to something you know and send out, or, better yet, generate a one-time link to send off to the user, together with another type of authentication that was set, like providing the answer to a user-defined question. Email is not safe enough to send passwords, and it is incredibly lax of you/your team to store passwords unencrypted. - -- Phillip Gawlowski Twitter: twitter.com/cynicalryan Take care to branch the right way on equality. ~ - The Elements of Programming Style (Kernighan & Plaugher) -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.8 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAkf+86QACgkQbtAgaoJTgL8ECwCeLILIWqNn2jvXIljhm4y4fZuw wdIAnjMtRdAWPLocw+K2LHx5RYjUGo56 =8nPA -----END PGP SIGNATURE----- --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Phillip Gawlowski wrote:> -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > Storing passwords as plaintext is bad. Reset the password to something > you know and send out, or, better yet, generate a one-time link to sendHey passwords are stored in encrypted form using Digest::SHA1.hexdigest("--#{salt}--#{password}--") but i want the way how i can decrypt it and also want your help in sending a mail. i have posted the error which was there. please send me reply of that too, thanks. -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Shikha Sharma wrote: | Phillip Gawlowski wrote: |> -----BEGIN PGP SIGNED MESSAGE----- |> Hash: SHA1 |> |> Storing passwords as plaintext is bad. Reset the password to something |> you know and send out, or, better yet, generate a one-time link to send | | Hey passwords are stored in encrypted form using | | Digest::SHA1.hexdigest("--#{salt}--#{password}--") A hash is one way. There is no way to recreate a hash, especially not one that is salted. - -- Phillip Gawlowski Twitter: twitter.com/cynicalryan ~ - You know you''ve been hacking too long when... ...your children do something they shouldn''t do, you tell them to stop, they do it just once more anyway, so you think "Well, they prefetched the instruction and are executing it in the delay slot." -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.8 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAkf+92QACgkQbtAgaoJTgL9u6ACfVFXbf2f+H2gqfdHkuDazApgD jqEAn27cpFDctRyIJJBZRXLRLXC4bE2R =Yhpo -----END PGP SIGNATURE----- --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Thanks for the info.. after i paste the code outside of the block, it worked for me. -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.