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

Soren Stoutner soren at debian.org
Mon Mar 31 20:50:05 BST 2025


Jörg-Volker

On Saturday, March 29, 2025 3:59:22 AM Mountain Standard Time Jörg-
Volker Peetz wrote:
> > I have added this information to README.Debian.
> > 
> > https://salsa.debian.org/ruby-team/redmine/-/blob/master/debian/
> > README.Debian?ref_type=heads#L43-55
> 
> 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/*
> 
> 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>"
> 
> (the line breaks are horrible, please correct it in the README)
> Using 'assets:clobber' instead of 'assets:precompile' fails because
> rake then tries to remove the link
> '/var/lib/redmine/default/public/assets' owned by user root.
> 
> In the UPGRADING document it says: "By default, Redmine
> automatically recompiles assets in production mode when the
> application starts."
> And indeed, doing
> 
>    # service unicorn stop
>    # rm -rf /var/cache/redmine/default/public/assets/*
>    # service unicorn start
> 
> the assets are rebuild correctly by redmine. Only difference is the
> ownership of the files in /var/cache/redmine/default/public/assets/
> which now belong to user root.

Thanks for the refined commands.  I have updated README.Debian.

https://salsa.debian.org/ruby-team/redmine/-/commit/
a433e8127270c5d2ce86dc5c2f002981d2e4d715

Please let me know if everything looks correct.

I added your name to the changelog and README.Debian.

-- 
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/20250331/5a63a775/attachment.sig>


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