Project

General

Profile

Actions

Defect #42114

closed

Themes are not working as expected with nginx

Added by Yar n 4 months ago. Updated 19 days ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
Themes
Target version:
-
Start date:
Due date:
% Done:

0%

Estimated time:
Resolution:
Affected version:

Description

Hello,
i've checked this new change:
https://www.redmine.org/projects/redmine/wiki/Themes

and i'm trying to make it work under nginx, but no luck... This new themes directory like invisible.
all files giving 404.
i also copied themes where default one stored, but it also doesn't help.

my current nginx config:

server {
server_name server;
listen 443 ssl ;
root /home/redmine/redmine/public;
ssl_certificate fullchain.cer;
ssl_certificate_key key.pem;
client_max_body_size 100m;
location / {
try_files $uri/index.html $uri.html $uri @ruby;
}
location @ruby {
proxy_set_header Host $http_host;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_redirect off;
proxy_read_timeout 300;
proxy_pass http://puma_redmine;
}
}
Actions #1

Updated by Mizuki ISHIKAWA 4 months ago

Does running the rake assets:precompile command make any difference?

Actions #2

Updated by Yar n 4 months ago

Mizuki ISHIKAWA wrote in #note-1:

Does running the rake assets:precompile command make any difference?

interesting...

redmine@devcenter:~/redmine$ bundle exec rake assets:precompile
rake aborted!
Gem::LoadError: listen is not part of the bundle. Add it to your Gemfile. (Gem::LoadError)
<internal:/home/redmine/.rbenv/versions/3.2.6/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:38:in `require'
<internal:/home/redmine/.rbenv/versions/3.2.6/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:38:in `require'
/home/redmine/redmine/config/environments/development.rb:58:in `block in <top (required)>'
/home/redmine/redmine/config/environments/development.rb:5:in `<top (required)>'
<internal:/home/redmine/.rbenv/versions/3.2.6/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:38:in `require'
<internal:/home/redmine/.rbenv/versions/3.2.6/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:38:in `require'
/home/redmine/redmine/config/environment.rb:16:in `<top (required)>'
<internal:/home/redmine/.rbenv/versions/3.2.6/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:38:in `require'
<internal:/home/redmine/.rbenv/versions/3.2.6/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:38:in `require'
/home/redmine/.rbenv/versions/3.2.6/bin/bundle:25:in `load'
/home/redmine/.rbenv/versions/3.2.6/bin/bundle:25:in `<main>'
Tasks: TOP => assets:precompile => environment
(See full trace by running task with --trace)

installed gem,
and `redmine@devcenter:~/redmine$ bundle exec rake assets:precompile RAILS_ENV=production` gave 0 output.

as a result didn't helped.

Actions #3

Updated by Yar n 4 months ago

it worked!!

i forgot that i did some more plays with nginx, now it work with config in the topic.

Thanks, 汪婷 汪 ISHIKAWA!

Actions #4

Updated by Yar n 4 months ago

hm... Mizuki ISHIKAWA, thank you!

Actions #5

Updated by Holger Just 4 months ago

  • Status changed from New to Closed

This seems to be fixed. Thus, I'm closing this issue.

Actions #6

Updated by İsmail Sahillioğlu 19 days ago

Holger Just wrote in #note-5:

This seems to be fixed. Thus, I'm closing this issue.

Hi,

I've been experiencing the same problem today. The bundle exec rake assets:precompile RAILS_ENV=production seems to fix the problem. But does it have to be this way? Why ain't it sufficient just install the theme in to the themes directory and restart the server?

If this is the only way for now, it should be mentioned in the Themes wiki page so that the users don't struggle trying to fix the same problem.

Actions #7

Updated by İsmail Sahillioğlu 19 days ago

İsmail Sahillioğlu wrote in #note-6:

Holger Just wrote in #note-5:

This seems to be fixed. Thus, I'm closing this issue.

Hi,

I've been experiencing the same problem today. The bundle exec rake assets:precompile RAILS_ENV=production seems to fix the problem. But does it have to be this way? Why ain't it sufficient just install the theme in to the themes directory and restart the server?

If this is the only way for now, it should be mentioned in the Themes wiki page so that the users don't struggle trying to fix the same problem.

Sorry, I forgot to mention the version of my Redmine instance. It is 6.0.5 .

Actions

Also available in: Atom PDF