We had faced same type of problem while working on www.scrumpad.com ,
next generation scrum project management tool. In that case we have
installed a gem rexml fix. that had saved us from this problem you
can check that one.

basically rexml is used for parsing
On Jul 22, 3:39 pm, Javier Quevedo <[email protected]> wrote:
> Hi guys.
> I am trying to copy files from one folder to  another.
> The code is quite simple:
>
>       frompath = File.join(fromdirectory,filename)
>       topath = File.join(todirectory,filename)
>       FileUtils.cp(frompath, topath)
>
> The code actually works and indeed copies the images.
> The problem is that right after copying them, the REXML throws the
> following exception:
>
> REXML::ParseException
>  log:
> #<RuntimeError: Illegal character '&' in raw string
> " JFIF     ;CREATOR: gd-jpeg v1.0 (using IJG JPEG v62), quality =
> 85
> C                      
>                    !         "$" $     C                                      
>                             
> \  "                      
>               }       !1A  Qa "q 2 #B R $3br
>      %&'()
> *456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz..
>
> So., what does REXML have to do with the code?
> The actual filename comes from a parsed element. The code previous to
> the copy does something like t his.
>
>  doc = REXML::Document.new(screencontent)
>     doc.root.each_recursive {|c|
>       if c.name == 'File'
>         images << c.attributes['source']
>
> After that, I loop through the images array to get and copy all of the
> image files.
> I must insist that before throwing the exception, the files are
> actually copied.
>
> Thanks so much for your help in advance.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to