From: Jordon Bedwell Date: 2009-07-02T07:12:48+09:00 Subject: Can't Convert Symbol to String Can anybody help me with this error? "Can't Convert Symbol to string" class StaticHtmlCacheExtension < Radiant::Extension version "0.1a" description "\"Static\" (X)HTML Caching" def activate Radiant::Cache.instance_eval :include, StaticHTMLCache end end module StaticHTMLCache def self.included(base) base.instance_eval do alias_method_chain :cache_page, :html end end def cache_page_with_html(metadata,content,path) return unless perform_caching cache_path=html_cache_path(path) logger.info("Caching Page: #{cache_path}") metadata = YAML.load(metadata) if (File.extname(cache_path).blank? || File.extname(cache_path) == ".seo") && (metadata['Content-Type'].nil? || metadata['Content-Type'].starts_with?('text/html')) cache_path = cache_path + '.html' end begin FileUtils.makedirs(File.dirname(cache_path)) File.open(cache_path, 'wb') { |f| f.write(content) } rescue Errno::EISDIR, Errno::EEXIST logger.error "StaticHTMLCache::NameCollisionError (Directory MisRepresentation):\n Strange Naming Scheme for URI: #{path}" nil end end def html_cache_path(path) cache_path = page_cache_path(path) if (cache_path.ends_with?('_site-root')) cache_path.sub!(/_site-root$/, 'index') end cache_path end end