I’m trying to follow along with the Agile Development with Ruby on Rails
book and have encountered a problem with code having the following
syntax (partial class provided):
require “digest/sha1”
class User < ActiveRecord::Base
private
def self.hash_password(password)
Digest:SHA1.hexdigest(password)
end
end
I’m getting an error as:
undefined method `hexdigest’ for :SHA1:Symbol
I have installed Ruby 1.8.4. How can I correct this error? I’m running
on Mac OS X and have followed the build instructions for Macs to install
this version of Ruby. If I need to manually move library/module files
please point me to instructions as to how.
Thanks!