Just try the echo statement and check what it is printing in the
model.May be the sha1 will be using Time.now function also in addtion
to its own coding.The time that value is authenticated and the time
when u are checking the authentication will be different

The solution is if the sha1 is encoded with time also just remove the
Time.now function from it.Then this will solve the issue.i have also
faced the similar problem when i used acts_as_authenticated plugin.

On Dec 28, 1:08 am, Sav <savar...@gmail.com> wrote:
> Ouch - I simply used Digest::SHA256 instead of Digest::SHA2 and it
> works now.
>
> On Dec 27, 8:44 am, Sav <savar...@gmail.com> wrote:
>
> > I'm migrating a working app to a new server, but all my authentication
> > tests are failing on SHA2.  The user.rb model has require 'digest/
> > sha2' at the top, yet I still get this error...
>
> > NameError: uninitialized constant Digest::SHA2
>
> > Any ideas how to resolve this issue?  I've been searching Google for a
> > day and haven't found anything.
>
> > Here is some more info on my new setup (running Debian etch)...
>
> > # ruby -v
> > ruby 1.8.5 (2006-08-25) [i486-linux]
>
> > # rails -v
> > Rails 2.2.2
>
> > # gem -v
> > 1.3.1
>
> > # gem list --local
>
> > *** LOCAL GEMS ***
>
> > actionmailer (2.2.2, 2.0.2)
> > actionpack (2.2.2, 2.0.2)
> > activerecord (2.2.2, 2.0.2)
> > activeresource (2.2.2, 2.0.2)
> > activesupport (2.2.2, 2.0.2)
> > cgi_multipart_eof_fix (2.5.0)
> > daemons (1.0.10)
> > fastthread (1.0.1)
> > gem_plugin (0.2.3)
> > hoe (1.8.2)
> > jruby-openssl (0.3)
> > memcache-client (1.5.0)
> > mongrel (1.1.5)
> > mongrel_cluster (1.0.5)
> > rails (2.2.2, 2.0.2)
> > rake (0.8.3)
> > ruby-openid (2.1.2)
> > rubyforge (1.0.1)
> > youtube-g (0.4.9.9)
> > ZenTest (3.11.0)
--~--~---------~--~----~------------~-------~--~----~
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@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to