Content
You are here:
Document upload failed on fresh install OP7
Added by Stéphane V over 7 years ago
Hello,
Trying to add an attachement to an existing work package in the demo project in production resulted in an error message “An internal error has occured.” with a nice red background.
I was not able to upload a document on an opeproject 7 instance.
I saw that the document plugin was removed (and therefore not activated in adminstration panel anymore)..? but the field “drop here your attachement” is present…
So my question is : is the attachement feaure maintained and, indeed yes, is there a trick to make it work (again) ?
Many thanks,
Replies (9)
Hi Stéphane,
both the documents plugin and attachments are actively supported in OpenProject. You are likely having a permission issue that prohibits OpenProject / the Rails worker to write to the attachment path.
1. Is there a relevant log entry in
/var/log/openproject/production.log
?2. What is the output of
openproject config:get ATTACHMENTS_STORAGE_PATH
andopenproject run ls -alh $(openproject config:get ATTACHMENTS_STORAGE_PATH)
Best,
Oliver
Thank for helping. I cannot use the command your have provided because the command “openproject” is not available (it is a fork of openproject-ce 7 from github with manual install) The attachements were working perfectly in OP6, but since the upgrade to OP7, it is not wokring anymore… :-( (I just kept the database and the apache config. The rest of the source code is a fresh git clone)
Here is the information that I found :
Can it be a simple issue as : user www-data cannot write into openproject files ?
EDIT : I tried this without succeess :
usermod -a -G www-data openproject
chgrp www-data /home/openproject/openproject-ce/files
chmod g+rwxs /home/openproject/openproject-ce/files
Hi Stéphane,
what branch are you running on?
stable/7
should be the one you’re using if you want to run the latest stable version.Can you raise the log output in
config/environments/production.rb
and restart the web server?Best,
Oliver
Yes, it is the branch stable/7. The information page shows “OpenProject 7.2.0 (Mysql2)” last change on 14/07/2017
I increased the debug level as proposed :
Now, we indeed have an error in log/production.log
I, [2017-07-19T10:18:05.156220 #28699] INFO — : Started POST “/api/v3/work_packages/2/attachments” for 10.42.17.56 at 2017-07-19 10:18:05 +0200
D, [2017-07-19T10:18:05.158816 #28699] DEBUG — : (0.1ms) SELECT MAX (`settings`.`updated_on`) FROM `settings`
D, [2017-07-19T10:18:05.160113 #28699] DEBUG — : User Load (0.1ms) SELECT `users`.* FROM `users` WHERE `users`.`type` IN (‘User’, ‘AnonymousUser’, ‘DeletedUser’, ‘SystemUser’) AND `users`.`id` = 1 LIMIT 1
D, [2017-07-19T10:18:05.161117 #28699] DEBUG — : WorkPackage Load (0.1ms) SELECT `work_packages`.* FROM `work_packages` WHERE `work_packages`.`id` = 2 LIMIT 1
D, [2017-07-19T10:18:05.162252 #28699] DEBUG — : Project Load (0.1ms) SELECT `projects`.* FROM `projects` WHERE `projects`.`id` = 1 LIMIT 1
D, [2017-07-19T10:18:05.163399 #28699] DEBUG — : (0.1ms) SELECT `enabled_modules`.`name` FROM `enabled_modules` WHERE `enabled_modules`.`project_id` = 1
D, [2017-07-19T10:18:05.164573 #28699] DEBUG — : Project Load (0.1ms) SELECT DISTINCT `projects`.* FROM `projects` INNER JOIN `enabled_modules` ON `projects`.`id` = `enabled_modules`.`project_id` AND `enabled_modules`.`name` IN (‘work_package_tracking’) AND `projects`.`status` = 1 WHERE `projects`.`status` = 1
E, [2017-07-19T10:18:05.167800 #28699] ERROR — : Grape rescuing from error: API::Errors::InternalError
Original error: #<ArgumentError: parser io argument must be a String or respond to readpartial() or read().
Stacktrace:
/home/openproject/openproject-ce/vendor/bundle/ruby/2.4.0/gems/multi_json-1.12.1/lib/multi_json/adapters/oj.rb:15:in `load’
/home/openproject/openproject-ce/vendor/bundle/ruby/2.4.0/gems/multi_json-1.12.1/lib/multi_json/adapters/oj.rb:15:in `load’
/home/openproject/openproject-ce/vendor/bundle/ruby/2.4.0/gems/multi_json-1.12.1/lib/multi_json/adapter.rb:21:in `load’
/home/openproject/openproject-ce/vendor/bundle/ruby/2.4.0/gems/multi_json-1.12.1/lib/multi_json.rb:122:in `load’
/home/openproject/openproject-ce/vendor/bundle/ruby/2.4.0/gems/representable-3.0.4/lib/representable/json.rb:38:in `from_json’
/home/openproject/openproject-ce/vendor/bundle/ruby/2.4.0/gems/roar-1.1.0/lib/roar/json.rb:21:in `from_json’
/home/openproject/openproject-ce/lib/api/v3/attachments/attachments_by_work_package_api.rb:41:in `parse_metadata’
/home/openproject/openproject-ce/lib/api/v3/attachments/attachments_by_work_package_api.rb:64:in `block (2 levels) in class:AttachmentsByWorkPackageAPI’
/home/openproject/openproject-ce/vendor/bundle/ruby/2.4.0/gems/grape-0.19.2/lib/grape/endpoint.rb:59:in `call’
/home/openproject/openproject-ce/vendor/bundle/ruby/2.4.0/gems/grape-0.19.2/lib/grape/endpoint.rb:59:in `block (2 levels) in generate_api_method’
/home/openproject/openproject-ce/vendor/bundle/ruby/2.4.0/gems/activesupport-5.0.3/lib/active_support/notifications.rb:166:in `instrument’
/home/openproject/openproject-ce/vendor/bundle/ruby/2.4.0/gems/grape-0.19.2/lib/grape/endpoint.rb:58:in `block in generate_api_method’
/home/openproject/openproject-ce/vendor/bundle/ruby/2.4.0/gems/grape-0.19.2/lib/grape/endpoint.rb:262:in `block in run’
/home/openproject/openproject-ce/vendor/bundle/ruby/2.4.0/gems/activesupport-5.0.3/lib/active_support/notifications.rb:166:in `instrument’
/home/openproject/openproject-ce/vendor/bundle/ruby/2.4.0/gems/grape-0.19.2/lib/grape/endpoint.rb:240:in `run’
/home/openproject/openproject-ce/vendor/bundle/ruby/2.4.0/gems/grape-0.19.2/lib/grape/endpoint.rb:313:in `block in build_stack’
/home/openproject/openproject-ce/vendor/bundle/ruby/2.4.0/gems/grape-0.19.2/lib/grape/middleware/base.rb:31:in `call!’
/home/openproject/openproject-ce/vendor/bundle/ruby/2.4.0/gems/grape-0.19.2/lib/grape/middleware/base.rb:24:in `call’
/home/openproject/openproject-ce/vendor/bundle/ruby/2.4.0/gems/grape-0.19.2/lib/grape/middleware/base.rb:31:in `call!’
/home/openproject/openproject-ce/vendor/bundle/ruby/2.4.0/gems/grape-0.19.2/lib/grape/middleware/base.rb:24:in `call’
/home/openproject/openproject-ce/vendor/bundle/ruby/2.4.0/gems/warden-1.2.7/lib/warden/manager.rb:36:in `block in call’
/home/openproject/openproject-ce/vendor/bundle/ruby/2.4.0/gems/warden-1.2.7/lib/warden/manager.rb:35:in `catch’
/home/openproject/openproject-ce/vendor/bundle/ruby/2.4.0/gems/warden-1.2.7/lib/warden/manager.rb:35:in `call’
/home/openproject/openproject-ce/vendor/bundle/ruby/2.4.0/gems/grape-0.19.2/lib/grape/middleware/error.rb:34:in `block in call!’
/home/openproject/openproject-ce/vendor/bundle/ruby/2.4.0/gems/grape-0.19.2/lib/grape/middleware/error.rb:33:in `catch’
/home/openproject/openproject-ce/vendor/bundle/ruby/2.4.0/gems/grape-0.19.2/lib/grape/middleware/error.rb:33:in `call!’
/home/openproject/openproject-ce/vendor/bundle/ruby/2.4.0/gems/grape-0.19.2/lib/grape/middleware/base.rb:24:in `call’
/home/openproject/openproject-ce/vendor/bundle/ruby/2.4.0/gems/rack-2.0.3/lib/rack/head.rb:12:in `call’
/home/openproject/openproject-ce/vendor/bundle/ruby/2.4.0/gems/grape-0.19.2/lib/grape/endpoint.rb:224:in `call!’
/home/openproject/openproject-ce/vendor/bundle/ruby/2.4.0/gems/grape-0.19.2/lib/grape/endpoint.rb:218:in `call’
/home/openproject/openproject-ce/vendor/bundle/ruby/2.4.0/gems/grape-0.19.2/lib/grape/router/route.rb:72:in `exec’
/home/openproject/openproject-ce/vendor/bundle/ruby/2.4.0/gems/grape-0.19.2/lib/grape/router.rb:119:in `process_route’
/home/openproject/openproject-ce/vendor/bundle/ruby/2.4.0/gems/grape-0.19.2/lib/grape/router.rb:74:in `block in identity’
/home/openproject/openproject-ce/vendor/bundle/ruby/2.4.0/gems/grape-0.19.2/lib/grape/router.rb:93:in `transaction’
/home/openproject/openproject-ce/vendor/bundle/ruby/2.4.0/gems/grape-0.19.2/lib/grape/router.rb:72:in `identity’
/home/openproject/openproject-ce/vendor/bundle/ruby/2.4.0/gems/grape-0.19.2/lib/grape/router.rb:57:in `block in call’
/home/openproject/openproject-ce/vendor/bundle/ruby/2.4.0/gems/grape-0.19.2/lib/grape/router.rb:135:in `with_optimization’
/home/openproject/openproject-ce/vendor/bundle/ruby/2.4.0/gems/grape-0.19.2/lib/grape/router.rb:56:in `call’
/home/openproject/openproject-ce/vendor/bundle/ruby/2.4.0/gems/grape-0.19.2/lib/grape/api.rb:119:in `call’
/home/openproject/openproject-ce/vendor/bundle/ruby/2.4.0/gems/grape-0.19.2/lib/grape/api.rb:45:in `call!’
/home/openproject/openproject-ce/vendor/bundle/ruby/2.4.0/gems/grape-0.19.2/lib/grape/api.rb:40:in `call’
/home/openproject/openproject-ce/vendor/bundle/ruby/2.4.0/gems/actionpack-5.0.3/lib/action_dispatch/routing/mapper.rb:17:in `block in class:Constraints’
/home/openproject/openproject-ce/vendor/bundle/ruby/2.4.0/gems/actionpack-5.0.3/lib/action_dispatch/routing/mapper.rb:46:in `serve’
/home/openproject/openproject-ce/vendor/bundle/ruby/2.4.0/gems/actionpack-5.0.3/lib/action_dispatch/journey/router.rb:39:in `block in serve’
/home/openproject/openproject-ce/vendor/bundle/ruby/2.4.0/gems/actionpack-5.0.3/lib/action_dispatch/journey/router.rb:26:in `each’
/home/openproject/openproject-ce/vendor/bundle/ruby/2.4.0/gems/actionpack-5.0.3/lib/action_dispatch/journey/router.rb:26:in `serve’
/home/openproject/openproject-ce/vendor/bundle/ruby/2.4.0/gems/actionpack-5.0.3/lib/action_dispatch/routing/route_set.rb:725:in `call’
/home/openproject/openproject-ce/vendor/bundle/ruby/2.4.0/bundler/gems/omniauth-40c6f5f751d2/lib/omniauth/builder.rb:63:in `call’
/home/openproject/openproject-ce/app/middleware/reset_current_user.rb:47:in `call’
/home/openproject/openproject-ce/vendor/bundle/ruby/2.4.0/gems/rack-2.0.3/lib/rack/tempfile_reaper.rb:15:in `call’
/home/openproject/openproject-ce/vendor/bundle/ruby/2.4.0/gems/rack-attack-5.0.1/lib/rack/attack.rb:147:in `call’
/home/openproject/openproject-ce/vendor/bundle/ruby/2.4.0/gems/rack-2.0.3/lib/rack/etag.rb:25:in `call’
/home/openproject/openproject-ce/vendor/bundle/ruby/2.4.0/gems/rack-2.0.3/lib/rack/deflater.rb:34:in `call’
/home/openproject/openproject-ce/vendor/bundle/ruby/2.4.0/gems/rack-2.0.3/lib/rack/conditional_get.rb:38:in `call’
/home/openproject/openproject-ce/vendor/bundle/ruby/2.4.0/gems/rack-2.0.3/lib/rack/head.rb:12:in `call’
/home/openproject/openproject-ce/vendor/bundle/ruby/2.4.0/gems/rack-2.0.3/lib/rack/session/abstract/id.rb:232:in `context’
/home/openproject/openproject-ce/vendor/bundle/ruby/2.4.0/gems/rack-2.0.3/lib/rack/session/abstract/id.rb:226:in `call’
/home/openproject/openproject-ce/vendor/bundle/ruby/2.4.0/gems/actionpack-5.0.3/lib/action_dispatch/middleware/cookies.rb:613:in `call’
/home/openproject/openproject-ce/vendor/bundle/ruby/2.4.0/gems/actionpack-5.0.3/lib/action_dispatch/middleware/callbacks.rb:38:in `block in call’
/home/openproject/openproject-ce/vendor/bundle/ruby/2.4.0/gems/activesupport-5.0.3/lib/active_support/callbacks.rb:97:in `run_callbacks’
/home/openproject/openproject-ce/vendor/bundle/ruby/2.4.0/gems/activesupport-5.0.3/lib/active_support/callbacks.rb:750:in `_run_call_callbacks’
/home/openproject/openproject-ce/vendor/bundle/ruby/2.4.0/gems/activesupport-5.0.3/lib/active_support/callbacks.rb:90:in `run_callbacks’
/home/openproject/openproject-ce/vendor/bundle/ruby/2.4.0/gems/actionpack-5.0.3/lib/action_dispatch/middleware/callbacks.rb:36:in `call’
/home/openproject/openproject-ce/vendor/bundle/ruby/2.4.0/gems/actionpack-5.0.3/lib/action_dispatch/middleware/remote_ip.rb:79:in `call’
/home/openproject/openproject-ce/vendor/bundle/ruby/2.4.0/gems/actionpack-5.0.3/lib/action_dispatch/middleware/debug_exceptions.rb:49:in `call’
/home/openproject/openproject-ce/vendor/bundle/ruby/2.4.0/gems/actionpack-5.0.3/lib/action_dispatch/middleware/show_exceptions.rb:31:in `call’
/home/openproject/openproject-ce/vendor/bundle/ruby/2.4.0/gems/railties-5.0.3/lib/rails/rack/logger.rb:36:in `call_app’
/home/openproject/openproject-ce/vendor/bundle/ruby/2.4.0/gems/railties-5.0.3/lib/rails/rack/logger.rb:24:in `block in call’
/home/openproject/openproject-ce/vendor/bundle/ruby/2.4.0/gems/activesupport-5.0.3/lib/active_support/tagged_logging.rb:69:in `block in tagged’
/home/openproject/openproject-ce/vendor/bundle/ruby/2.4.0/gems/activesupport-5.0.3/lib/active_support/tagged_logging.rb:26:in `tagged’
/home/openproject/openproject-ce/vendor/bundle/ruby/2.4.0/gems/activesupport-5.0.3/lib/active_support/tagged_logging.rb:69:in `tagged’
/home/openproject/openproject-ce/vendor/bundle/ruby/2.4.0/gems/railties-5.0.3/lib/rails/rack/logger.rb:24:in `call’
/home/openproject/openproject-ce/vendor/bundle/ruby/2.4.0/gems/request_store-1.3.2/lib/request_store/middleware.rb:9:in `call’
/home/openproject/openproject-ce/vendor/bundle/ruby/2.4.0/gems/actionpack-5.0.3/lib/action_dispatch/middleware/request_id.rb:24:in `call’
/home/openproject/openproject-ce/vendor/bundle/ruby/2.4.0/gems/rack-2.0.3/lib/rack/method_override.rb:22:in `call’
/home/openproject/openproject-ce/vendor/bundle/ruby/2.4.0/gems/rack-2.0.3/lib/rack/runtime.rb:22:in `call’
/home/openproject/openproject-ce/vendor/bundle/ruby/2.4.0/gems/activesupport-5.0.3/lib/active_support/cache/strategy/local_cache_middleware.rb:28:in `call’
/home/openproject/openproject-ce/vendor/bundle/ruby/2.4.0/gems/actionpack-5.0.3/lib/action_dispatch/middleware/executor.rb:12:in `call’
/home/openproject/openproject-ce/vendor/bundle/ruby/2.4.0/gems/rack-2.0.3/lib/rack/sendfile.rb:111:in `call’
/home/openproject/openproject-ce/vendor/bundle/ruby/2.4.0/gems/railties-5.0.3/lib/rails/engine.rb:522:in `call’
/home/openproject/openproject-ce/vendor/bundle/ruby/2.4.0/gems/railties-5.0.3/lib/rails/railtie.rb:193:in `public_send’
/home/openproject/openproject-ce/vendor/bundle/ruby/2.4.0/gems/railties-5.0.3/lib/rails/railtie.rb:193:in `method_missing’
/home/openproject/openproject-ce/vendor/bundle/ruby/2.4.0/gems/rack-protection-2.0.0/lib/rack/protection/frame_options.rb:31:in `call’
/home/openproject/openproject-ce/vendor/bundle/ruby/2.4.0/gems/rack-protection-2.0.0/lib/rack/protection/json_csrf.rb:26:in `call’
/home/openproject/openproject-ce/vendor/bundle/ruby/2.4.0/gems/rack-2.0.3/lib/rack/urlmap.rb:68:in `block in call’
/home/openproject/openproject-ce/vendor/bundle/ruby/2.4.0/gems/rack-2.0.3/lib/rack/urlmap.rb:53:in `each’
/home/openproject/openproject-ce/vendor/bundle/ruby/2.4.0/gems/rack-2.0.3/lib/rack/urlmap.rb:53:in `call’
/home/openproject/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/passenger-5.1.5/src/ruby_supportlib/phusion_passenger/rack/thread_handler_extension.rb:97:in `process_request’
/home/openproject/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/passenger-5.1.5/src/ruby_supportlib/phusion_passenger/request_handler/thread_handler.rb:160:in `accept_and_process_next_request’
/home/openproject/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/passenger-5.1.5/src/ruby_supportlib/phusion_passenger/request_handler/thread_handler.rb:113:in `main_loop’
/home/openproject/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/passenger-5.1.5/src/ruby_supportlib/phusion_passenger/request_handler.rb:416:in `block (3 levels) in start_threads’
/home/openproject/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/passenger-5.1.5/src/ruby_supportlib/phusion_passenger/utils.rb:113:in `block in create_thread_and_abort_on_exception’
Additional information :
ls -als |grep files
4 drwxr-xr-x 2 openproject openproject 4096 Jul 17 13:21 files
grep -nr “attachments_storage” ~/openproject-ce
[…]
./config/configuration.yml:187: attachments_storage_path: /home/openproject/openproject-ce/files
[…]
./lib/open_project/configuration.rb:40: ‘attachments_storage’ => ‘file’,
[…]
—> maybe also an issue between “files” or “file” ?
—> How can we verify the actual value of the attachments_storage_path global variable ?
RAILS_ENV=production ./bin/rails console
ENV
=> {“RBENV_VERSION”=>“2.4.1”, “XDG_SESSION_ID”=>“742”, “NODENV_SHELL”=>“su”, “TERM”=>“xterm”, “SHELL”=>“/bin/sh”, “USER”=>“openproject”, “LS_COLORS”=>“rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:.tar=01;31:.tgz=01;31:.arc=01;31:.arj=01;31:.taz=01;31:.lha=01;31:.lz4=01;31:.lzh=01;31:.lzma=01;31:.tlz=01;31:.txz=01;31:.tzo=01;31:.t7z=01;31:.zip=01;31:.z=01;31:.Z=01;31:.dz=01;31:.gz=01;31:.lrz=01;31:.lz=01;31:.lzo=01;31:.xz=01;31:.bz2=01;31:.bz=01;31:.tbz=01;31:.tbz2=01;31:.tz=01;31:.deb=01;31:.rpm=01;31:.jar=01;31:.war=01;31:.ear=01;31:.sar=01;31:.rar=01;31:.alz=01;31:.ace=01;31:.zoo=01;31:.cpio=01;31:.7z=01;31:.rz=01;31:.cab=01;31:.jpg=01;35:.jpeg=01;35:.gif=01;35:.bmp=01;35:.pbm=01;35:.pgm=01;35:.ppm=01;35:.tga=01;35:.xbm=01;35:.xpm=01;35:.tif=01;35:.tiff=01;35:.png=01;35:.svg=01;35:.svgz=01;35:.mng=01;35:.pcx=01;35:.mov=01;35:.mpg=01;35:.mpeg=01;35:.m2v=01;35:.mkv=01;35:.webm=01;35:.ogm=01;35:.mp4=01;35:.m4v=01;35:.mp4v=01;35:.vob=01;35:.qt=01;35:.nuv=01;35:.wmv=01;35:.asf=01;35:.rm=01;35:.rmvb=01;35:.flc=01;35:.avi=01;35:.fli=01;35:.flv=01;35:.gl=01;35:.dl=01;35:.xcf=01;35:.xwd=01;35:.yuv=01;35:.cgm=01;35:.emf=01;35:.axv=01;35:.anx=01;35:.ogv=01;35:.ogx=01;35:.aac=00;36:.au=00;36:.flac=00;36:.m4a=00;36:.mid=00;36:.midi=00;36:.mka=00;36:.mp3=00;36:.mpc=00;36:.ogg=00;36:.ra=00;36:.wav=00;36:.axa=00;36:.oga=00;36:.spx=00;36:.xspf=00;36:”, “RBENV_ROOT”=>“/home/openproject/.rbenv”, “TMOUT”=>“3600”, “RBENV_HOOK_PATH”=>“/home/openproject/.rbenv/rbenv.d:/usr/local/etc/rbenv.d:/etc/rbenv.d:/usr/lib/rbenv/hooks”, “PATH”=>“/home/openproject/openproject-ce/vendor/bundle/ruby/2.4.0/bin:/home/openproject/.rbenv/versions/2.4.1/bin:/home/openproject/.rbenv/libexec:/home/openproject/.rbenv/plugins/ruby-build/bin:/home/openproject/.nodenv/shims:/home/openproject/.nodenv/bin:/home/openproject/.rbenv/shims:/home/openproject/.rbenv/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games”, “MAIL”=>“/var/mail/openproject”, “PWD”=>“/home/openproject/openproject-ce”, “LANG”=>“en_US.UTF-8”, “RBENV_SHELL”=>“su”, “HOME”=>“/home/openproject”, “SHLVL”=>“1”, “LANGUAGE”=>“en_US:en”, “RAILS_ENV”=>“production”, “RBENV_DIR”=>“/home/openproject/openproject-ce/bin”, “LOGNAME”=>“openproject”, “RUBYLIB”=>“/home/openproject/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/bundler-1.15.1/lib:/home/openproject/.rbenv/rbenv.d/exec/gem-rehash”, “BUNDLE_GEMFILE”=>“/home/openproject/openproject-ce/Gemfile”, “BUNDLER_ORIG_PATH”=>“/home/openproject/.rbenv/versions/2.4.1/bin:/home/openproject/.rbenv/libexec:/home/openproject/.rbenv/plugins/ruby-build/bin:/home/openproject/.nodenv/shims:/home/openproject/.nodenv/bin:/home/openproject/.rbenv/shims:/home/openproject/.rbenv/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games”, “GEM_PATH”=>“”, “GEM_HOME”=>“/home/openproject/openproject-ce/vendor/bundle/ruby/2.4.0”, “BUNDLE_BIN_PATH”=>“/home/openproject/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/bundler-1.15.1/exe/bundle”, “BUNDLER_VERSION”=>“1.15.1”, “RUBYOPT”=>“-rbundler/setup”, “MANPATH”=>“/home/openproject/openproject-ce/vendor/bundle/ruby/2.4.0/gems/unicorn-5.3.0/man”, “LINES”=>“52”, “COLUMNS”=>“189”}
—> There is no attachements_storage_path in ruby ENV ? (maybe a fallback on a default value then ?)
Additional information from Admin panel :
You have installed the
dev
branch of OpenProject. (Version 7.2.0., yet unreleased). There was a bug breaking attachments some while ago, so if you seriously want to run the dev branch, keep it updated.I highly recommend against running the dev branch in production however.
Yes, it seems I messed up by merging the dev branch from github (which is the default branch) in my production brach.. Sad !
How can I solve this ?
—> Can anyone try the attachement of pdf files in 7.2.0 to tell me if it is working ??
You are mixing up your responses here, you mentioned earlier that you’re using a manual installation on a fork from openproject-ce (this message). That repository uses
stable/7
as the default branch.Our core repository used for developing uses the
dev
branch as the default branch. This is caused by several integrations with GitHub such as CodeClimate thatcan only compare changes to this default branch, so we’re basically forced to use dev if we want to use them.
Either way, in a manual installation, be very careful where you pull from.
dev
, but did not run migrations, you could simplygit reset --hard origin/stable/7
(where origin is the remote of openproject-ce).On our 7.2. development/edge instances, attachments work fine, so I suspect the error is somewhere in your fork - either it is not updated to the dev branch, or some other issue.
I indeed pulled the dev branch in my stable branch. Sad .
Pulling the latest commit of the dev branch solved this topic (.e. attachements are now working).
I will of course pull the stable/7 branch in the future for production servers (I’ll wait until the release of 7.2.0 to switch back to stable branch).
Many thanks for helping !
Openproject rocks ! :-)