On Tue, 2008-03-11 at 18:58 -0700, Craig W. wrote:
this file path is not within RAILS path but rather outside of it.
files saved without a path are clearly saved in the RAILS_ROOT directory
as user ‘craig’
user ‘craig’ clearly has permissions to save files in that path
(actually, the path is an NFS mounted path but I don’t see why that
Obviously I am missing some bit of information that would tell me why
OK - this is truly strange, because I can get it to work from
script/console but not from within my controller…(I have removed the
from the script/console output for readability).
@qm_book = QmManual.find(:all, \
:conditions => ["section = ?", "I/A"], \
:order => 'priority')
=> [# Much data deleted… }>]
File.open(“I-A-files.txt”, “w”) do |file|
for qm_book in @qm_book
file.write “/home/path_to/New_QM_Manual/” +
qm_book.section + “/” + qm_book.file_name + “.pdf” + “\n”
if qm_book.no_of_pages.modulo(2) != 0
“/home/path/to/Build-PDF/blank-page.pdf” + “\n”
FileUtils.mv “I-A-files.txt”, “/home/path/to/Build-PDF/”
but this same code in my controller gets the error that I listed up top.
why would file write permissions differ from script/console and
controller code? mongrel? mongrel is running as me - same user.