[DRE-maint] Bug#1101504: redmine: served via unicorn and nginx, errors due to 'GET /assets/...'

Soren Stoutner soren at debian.org
Sat Apr 5 01:35:55 BST 2025


Jörg-Volker,

Thanks for the information.

I am going to spend some time next week installing multi-tenancy 
systems and playing with plugins to make sure I understand all the 
implications of these commands and then update README.Debian.

On Tuesday, April 1, 2025 6:31:37 AM Mountain Standard Time Jörg-
Volker Peetz wrote:
> >> Yes, I used your hint and refined it a little bit:
> >> 
> >> First, the old assets have to be removed:
> >>     # rm -rf /var/cache/redmine/default/public/assets/*
> 
> In the assets directory is at least one dot file (.manifest.json).
> Maybe, better do
> 
> (cd /var/cache/redmine/default/public ; rm -rf assets ; \
>      mkdir -m 755 assets ; chown www-data: assets)
> 
> >> then rebuild the assets, taking some wisdom from the
> >> 
> >> redmine.postinst script:
> >>     # su -s <REDMINE_CURRENT_USER> /bin/sh -c "cd
> >>     /usr/share/redmine
> >> 
> >> ; REDMINE_INSTANCE=<INSTANCE> bundle exec rake assets:precompile
> >> RAILS_ENV="production" RAILS_RELATIVE_URL_ROOT=/<SUB-URI>"
> 
> I placed the switch '-s' wrong and maybe, for clarity the arguments
> should be reordered. The following works:
> 
> su <REDMINHE_CURRENT_USER> -s /bin/sh -c \
>      "cd /usr/share/redmine ; REDMINE_INSTANCE=<INSTANCE> \
>      RAILS_ENV=production RAILS_RELATIVE_URL_ROOT=/<SUB-URI> \
>      bundle exec rake assets:precompile"
> 
> And it could be added:
> 
> """
> Alternatively, run the following command to configure the assets
> with alias:
> 
> service <REDMINE> restart
> 
> which makes use of the fact that by default, Redmine automatically
> recompiles assets in production mode when the application is (re-)
> started. """
> 
> <snip>
> 
> Regards,
> Jörg.


-- 
Soren Stoutner
soren at debian.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: This is a digitally signed message part.
URL: <http://alioth-lists.debian.net/pipermail/pkg-ruby-extras-maintainers/attachments/20250404/ae4ab6a8/attachment.sig>


More information about the Pkg-ruby-extras-maintainers mailing list