Rio instabilities

I’m having some serious problems with rio ( within my
Rails app and I was wondering if you lot could offer any advice.

So: I’m writing an app that generates folders full of content. The rough
process of what happens when you run the “Generate” method on a “Site”
object is:

it copies a template directory to a directory named (
for each line in site.pages it copies
( to
it then does a great big contents.gsub through each file in the
replacing some meta-template tags with content.

Now, it creates the files fine, and copies them all fine… but often
errors saying “you can’t gsub here” and the reason you can’t is because
the files are empty.

Sometimes, it writes some of the files correctly and the remainder are
empty; quite often, the whole lot are empty. 0kb.

What’s going on? Is this because Ruby is sending commands to the shell
faster than the shell can keep up? I’ve put various sleep commands in,
they don’t make a blind bit of difference. Sometimes the whole thing
perfectly; sometimes it fails spectacularly. By and large, Rio seems to
fine when I mock these functions up in a Ruby script file, but it’s when
work this stuff into the Rails application that it starts falling over.



This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs