From c78e097841fb04f69ec3d131b08ecd6b49c5d689 Mon Sep 17 00:00:00 2001 From: Chris Eppstein Date: Fri, 23 Jul 2010 19:36:40 -0700 Subject: [PATCH] Don't use the Base64 library. It's not found in ruby 1.9. --- lib/compass/sass_extensions/functions/inline_image.rb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/compass/sass_extensions/functions/inline_image.rb b/lib/compass/sass_extensions/functions/inline_image.rb index 515804c3..77035ebd 100644 --- a/lib/compass/sass_extensions/functions/inline_image.rb +++ b/lib/compass/sass_extensions/functions/inline_image.rb @@ -1,4 +1,3 @@ -require 'base64' module Compass::SassExtensions::Functions::InlineImage def inline_image(path, mime_type = nil) @@ -47,7 +46,7 @@ private def data(real_path) if File.readable?(real_path) - Base64.encode64(File.read(real_path)).gsub("\n","") + [File.read(real_path)].pack('m').gsub("\n","") else raise Compass::Error, "File not found or cannot be read: #{real_path}" end