HugoHasenbein / redmine_preview_office

Plugin for Redmine. Preview Microsoft Office Documents in Redmine's preview pane
https://www.redmine.org/plugins/redmine_preview_office
GNU General Public License v2.0
31 stars 16 forks source link

can not work with 3.4.6 #14

Closed lnh089 closed 4 years ago

lnh089 commented 5 years ago

Hello, I have installed this plugin,but cannot preview office documents,below are logs:

Started GET "/attachments/preview_office/23" for 192.168.16.33 at 2019-09-25 15:06:17 +0800 Processing by AttachmentsController#preview_office as HTML Parameters: {"id"=>"23"} Current user: admin (id=1) Creating preview with libreoffice failed (pid 11061 exit 1): Command: cd /tmp/d20190925-11002-x5y9ma; 'soffice' --convert-to pdf '/opt/redmine/files/2019/09/190925114957_2f239f4c27f617e9dfc2683b995a519f.docx'; mv '190925114957_2f239f4c27f617e9dfc2683b995a519f.pdf' '/opt/redmine/tmp/thumbnails/23_651c2e7327911aad6069e3a6f2a43a211a082a046c86bf25bded6c5619eda7bc.pdf' Completed 404 Not Found in 1142ms (ActiveRecord: 1.5ms) [root@localhost redmine]# redmine

mhenman commented 4 years ago

I had the exact same error, in my case it turned out to be that the user that Redmine runs as (in my case www-data) could not create the .config directory in its home directory. I ran the following and now it's working great:

$ sudo mkdir /var/www/.config $ sudo chown www-data /var/www/.config

Note: I'm running 3.4.6 on ubuntu 16.04, apache 2.4.18 and passenger 5.0.27.

lnh089 commented 4 years ago

I had the exact same error, in my case it turned out to be that the user that Redmine runs as (in my case www-data) could not create the .config directory in its home directory. I ran the following and now it's working great:

$ sudo mkdir /var/www/.config $ sudo chown www-data /var/www/.config

Note: I'm running 3.4.6 on ubuntu 16.04, apache 2.4.18 and passenger 5.0.27.

Hi mhenman, thank you! I have config redmine as below,and set the .config with you idea,but still not work.

mkdir /var/www/.config

chown apache:apache /var/www/.config

redmine's path is /opt/redmine rm11