Wed 21 Nov 2007
text.rb:292:in `normalize’: private method `gsub’ called for 35:Fixnum (NoMethodError)
Posted by liucougar under LinuxJust before generating the manifest file, ec2-bundle-vol under gentoo, throws this error at me:
Googling around, it turns out that, it’s due to my “too recent” version of ruby (I only use stable packages in gentoo, but we all know gentoo is always cutting edge, even its stable branch, isn’t it?), which has a backward incompability. The fix is trivial:
— rexml/text.rb.orig 2007-10-22 08:00:04.000000000 +0100
+++ rexml/text.rb 2007-10-22 08:00:33.000000000 +0100
@@ -286,7 +286,7 @@
EREFERENCE = /&(?!#{Entity::NAME};)/
# Escapes all possible entities
def Text::normalize( input, doctype=nil, entity_filter=nil )
- copy = input
+ copy = input.to_s
# Doing it like this rather than in a loop improves the speed
#copy = copy.gsub( EREFERENCE, ‘&’ )
copy = copy.gsub( “&”, “&” )
+++ rexml/document.rb 2007-10-22 08:03:01.000000000 +0100
@@ -183,7 +183,7 @@
output = Output.new( output, xml_decl.encoding )
end
formatter = if indent > -1
- if transitive
+ if trans
REXML::Formatters::Transitive.new( indent, ie_hack )
else
REXML::Formatters::Pretty.new( indent, ie_hack )
RSS feed for comments on this post. TrackBack this post
February 19th, 2008 at 8:06 pm
[...] The third problem happens when creating an image manifest in ec2-bundle-vol. The error is as [...]