4.10.2006

No such file or directory?

134 def fileDump
135 @toDump = getPoem(@params[:poemnumber])
136 File::open( "public/poem-" + Date.today.to_s + ".xml", "w" ) do |f|
137 f << ""
138 f << "" + Date.today.to_s + ""
139 @toDump.each do |p|
140 #Writes out the contents of the table section for this poem.
141 f << "\n "
142 f << "\n " + p.poemline + ""
143 f << "\n " + p.user.firstname + " " + p.user.lastname + ""
144 f << "\n "
145 end
146 f << "
"
147 end
148 emptyPoem
149 end

No comments: