Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ruby 3.2 support #529

Closed
outductor opened this issue Dec 4, 2023 · 11 comments
Closed

Ruby 3.2 support #529

outductor opened this issue Dec 4, 2023 · 11 comments
Assignees

Comments

@outductor
Copy link

Sicne 5.1.0, Rubt 3.2 is supported and we can use YJIT properly.

@CSCSxx
Copy link

CSCSxx commented Dec 4, 2023

Hello, I use your Dockerfile in a Synology Nas via the integrated Docker Manager.
The current version 5.0.7-1 still uses the old Ruby interpreter in version 2.7.5 (version 2.7.8 would be the last in this series and this is already EOL!)
2.7 is specified in the variable list - if I change this value to 3.0 even before starting the container for the first time, the 2.7 version will continue to be used - how can I change this using board resources?
Thanks for your support

@outductor
Copy link
Author

@CSCSxx You should make your own issue... that's not what we discuss in this issue

@jcormier jcormier self-assigned this Dec 4, 2023
@jcormier
Copy link
Collaborator

jcormier commented Dec 4, 2023

According to your title, your both requesting a newer version of Ruby. Unfortunately, 2.7 is the newest version of ruby in the brightbox/ruby-ng repo. Which means bumping the OS version, which cascades into a lot of other changes.

I will try to bump it again, but it might turn into a project.

@jcormier
Copy link
Collaborator

jcormier commented Dec 4, 2023

Alright, this took way too long but I pushed a new branch, ruby3.2 that moves the 5.1.1 redmine to ruby 3.2. This ended up involving swapping to a Debian-based distro. So it would be good if people would try it out and see if it works before I merge it into master.

I don't know anything about YJIT, does redmine support it? How do you even enable it?

@outductor
Copy link
Author

outductor commented Dec 4, 2023

https://shopify.engineering/ruby-yjit-is-production-ready
https://railsatscale.com/2023-09-18-ruby-3-3-s-yjit-runs-shopify-s-production-code-15-faster/

this should be nothing but platform agnostic change, meaning redmine doesn't specifically have to care about it.

In order to turn it on and off, you just need to specify RUBY_YJIT_ENABLE=1 or RUBYOPT=--yjit in your ENV option. I am not saying we should enable YJIT by default, since it's just my preference and motivation of adopting Ruby 3.2.

@kannrem
Copy link

kannrem commented Jan 15, 2024

Alright, this took way too long but I pushed a new branch, ruby3.2 that moves the 5.1.1 redmine to ruby 3.2. This ended up involving swapping to a Debian-based distro. So it would be good if people would try it out and see if it works before I merge it into master.

I don't know anything about YJIT, does redmine support it? How do you even enable it?

We tested the ruby3.2 branch and its working as expected. thanks. Could you please merge to master or create a new image out of it? Also we would like to point out the problem with attachments which will get saved in /redmine/files. this directory is not in sync with mounted volume /data/files. hence the data there are not persisted and attachments are getting lost once the new container brought up.

@jcormier
Copy link
Collaborator

Also we would like to point out the problem with attachments which will get saved in /redmine/files. this directory is not in sync with mounted volume /data/files. hence the data there are not persisted and attachments are getting lost once the new container brought up.

eh? thats a huge problem. Though neither of those paths exist I'm going to assume your paraphrasing...

@jcormier
Copy link
Collaborator

Also we would like to point out the problem with attachments which will get saved in /redmine/files. this directory is not in sync with mounted volume /data/files. hence the data there are not persisted and attachments are getting lost once the new container brought up.

So not sure what you mean, I just tested in the master branch and files were correctly persisted.

root@5d231c2e4892:/home/redmine/redmine# ls /home/redmine/data/files/2024/01/2401152042*
/home/redmine/data/files/2024/01/240115204204_6252_23026330_bootlog.txt
/home/redmine/data/files/2024/01/240115204216_am62a7_evm_edgeai_09_00_01_08.log
$ ls -l /srv/docker/redmine/redmine/files/2024/01/2401152042*
-rw-r--r-- 1 jcormier-local jcormier-local  42449 Jan 15 10:12 /srv/docker/redmine/redmine/files/2024/01/240115204204_6252_23026330_bootlog.txt
-rw-r--r-- 1 jcormier-local jcormier-local 363980 Jan 15 10:12 /srv/docker/redmine/redmine/files/2024/01/240115204216_am62a7_evm_edgeai_09_00_01_08.log

I also tested it on the ruby3.2 branch and had no issue with files persisting.

@kannrem
Copy link

kannrem commented Jan 15, 2024

Also we would like to point out the problem with attachments which will get saved in /redmine/files. this directory is not in sync with mounted volume /data/files. hence the data there are not persisted and attachments are getting lost once the new container brought up.

So not sure what you mean, I just tested in the master branch and files were correctly persisted.

root@5d231c2e4892:/home/redmine/redmine# ls /home/redmine/data/files/2024/01/2401152042*
/home/redmine/data/files/2024/01/240115204204_6252_23026330_bootlog.txt
/home/redmine/data/files/2024/01/240115204216_am62a7_evm_edgeai_09_00_01_08.log
$ ls -l /srv/docker/redmine/redmine/files/2024/01/2401152042*
-rw-r--r-- 1 jcormier-local jcormier-local  42449 Jan 15 10:12 /srv/docker/redmine/redmine/files/2024/01/240115204204_6252_23026330_bootlog.txt
-rw-r--r-- 1 jcormier-local jcormier-local 363980 Jan 15 10:12 /srv/docker/redmine/redmine/files/2024/01/240115204216_am62a7_evm_edgeai_09_00_01_08.log

I also tested it on the ruby3.2 branch and had no issue with files persisting.

sorry, my bad! i was expecting the attachment data to be in REDMINE_ROOT/files directory(/home/redmine/redmine/files). that is where our existing redmine stores the files. but things are clear now . thank you!

@kannrem
Copy link

kannrem commented Feb 6, 2024

@jcormier Thankyou for ruby support as most of the plugins we tried requires ruby 3.x. Could you please merge this branch to master or would you be able to push a seperate image with ruby tag. Thankyou

@jcormier
Copy link
Collaborator

jcormier commented Feb 6, 2024

Thanks for the bump, this has been dragging for quite a while. I'm still fairly swamped at work currently.

I merged the ruby changes into master, and tagged 5.1.1-4. Docker images are building now.

@jcormier jcormier closed this as completed Feb 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants