I have an application which I would like to use libreoffice to batch convert files to html. I have the following method:
def set_versioned_odt
condition = %x(soffice --invisible --convert-to html /path/to/file.odt --outdir /path/to/dir/)
if condition
Rails.logger.info "This has been finished"
else
Rails.logger.info "This failed..."
end
end
When I run this method in the application. It will return a failing statement; however, if I run this command in the rails console, soffice will process correctly. Does anyone know what I am doing wrong in the rails app?
Thanks.
Best guess is that
sofficeisn’t in the path. try specifying the full path tosoffice.