The Base64 module isn’t available in earlier versions of Ruby 1.9.

Methods
D
E
S
Class Public methods
decode64(data)

Decodes a base 64 encoded string to its original representation.

 ActiveSupport::Base64.decode64("T3JpZ2luYWwgdW5lbmNvZGVkIHN0cmluZw==")
 # => "Original unencoded string"
    # File activesupport/lib/active_support/base64.rb, line 21
21:     def self.decode64(data)
22:       data.unpack("m").first
23:     end
encode64(data)

Encodes a string to its base 64 representation. Each 60 characters of output is separated by a newline character.

 ActiveSupport::Base64.encode64("Original unencoded string")
 # => "T3JpZ2luYWwgdW5lbmNvZGVkIHN0cmluZw==\n"
    # File activesupport/lib/active_support/base64.rb, line 13
13:     def self.encode64(data)
14:       [data].pack("m")
15:     end
strict_encode64(value)

Included in Ruby 1.9

    # File activesupport/lib/active_support/base64.rb, line 29
29:   def Base64.strict_encode64(value)
30:     encode64(value).gsub(/\n/, '')
31:   end