Skip to content

Commit

Permalink
Add extra pieces to finish Ruby 3.3.0 addition
Browse files Browse the repository at this point in the history
Update docs to reflect JRuby updates
  • Loading branch information
ajhodgson authored and CamJN committed Dec 28, 2023
1 parent 53ad9d4 commit a53fa2d
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 5 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
## not released
* Added a Ruby 3.3.0 image
* Upgraded to JRuby 9.3.13.0 (from 9.3.11.0)
* Upgraded to JRuby 9.4.5.0 (from 9.4.3.0)

## 2.6.0 (release date: 2023-11-20)
* Upgraded to Phusion Passenger 6.0.19 (from 6.0.18).
* Switched image base to phusion/baseimage:jammy-1.0.1
Expand Down
16 changes: 11 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ Basics (learn more at [baseimage-docker](http://phusion.github.io/baseimage-dock

Language support:

* Ruby 3.0.6, 3.1.4, 3.2.2 and JRuby 9.3.11.0 and 9.4.3.0.
* Ruby 3.0.6, 3.1.4, 3.2.2, 3.3.0 and JRuby 9.3.11.0 and 9.4.3.0.
* RVM is used to manage Ruby versions. [Why RVM?](#why_rvm)
* 3.2.2 is configured as the default.
* JRuby is installed from source, but we register an APT entry for it.
Expand Down Expand Up @@ -132,6 +132,7 @@ Passenger-docker consists of several images, each one tailor made for a specific
* `phusion/passenger-ruby30` - Ruby 3.0.
* `phusion/passenger-ruby31` - Ruby 3.1.
* `phusion/passenger-ruby32` - Ruby 3.2.
* `phusion/passenger-ruby33` - Ruby 3.3.
* `phusion/passenger-jruby93` - JRuby 9.3.
* `phusion/passenger-jruby94` - JRuby 9.4.

Expand Down Expand Up @@ -202,6 +203,7 @@ CMD ["/sbin/my_init"]
#RUN /pd_build/ruby-3.0.*.sh
#RUN /pd_build/ruby-3.1.*.sh
#RUN /pd_build/ruby-3.2.*.sh
#RUN /pd_build/ruby-3.3.*.sh
#RUN /pd_build/jruby-9.3.*.sh
#RUN /pd_build/jruby-9.4.*.sh
#
Expand Down Expand Up @@ -258,6 +260,8 @@ server {
passenger_user app;
# If this is a Ruby app, specify a Ruby version:
# For Ruby 3.3
passenger_ruby /usr/bin/ruby3.3;
# For Ruby 3.2
passenger_ruby /usr/bin/ruby3.2;
# For Ruby 3.1
Expand Down Expand Up @@ -440,10 +444,12 @@ RUN bash -lc 'rvm --default use ruby-3.0.6'
RUN bash -lc 'rvm --default use ruby-3.1.4'
# Ruby 3.2.2
RUN bash -lc 'rvm --default use ruby-3.2.2'
# JRuby 9.3.11.0
RUN bash -lc 'rvm --default use jruby-9.3.11.0'
# JRuby 9.4.3.0
RUN bash -lc 'rvm --default use jruby-9.4.3.0'
# Ruby 3.3.0
RUN bash -lc 'rvm --default use ruby-3.3.0'
# JRuby 9.3.13.0
RUN bash -lc 'rvm --default use jruby-9.3.13.0'
# JRuby 9.4.5.0
RUN bash -lc 'rvm --default use jruby-9.4.5.0'
```

Learn more: [RVM: Setting the default Ruby](https://rvm.io/rubies/default).
Expand Down
4 changes: 4 additions & 0 deletions image/nginx-passenger.sh
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,10 @@ run sed -i 's|invoke-rc.d nginx rotate|sv 1 nginx|' /etc/logrotate.d/nginx
run sed -i -e '/sv 1 nginx.*/a\' -e ' passenger-config reopen-logs >/dev/null 2>&1' /etc/logrotate.d/nginx

## Precompile Ruby extensions.
if [[ -e /usr/bin/ruby3.3 ]]; then
run ruby3.3 -S passenger-config build-native-support
run setuser app ruby3.3 -S passenger-config build-native-support
fi
if [[ -e /usr/bin/ruby3.2 ]]; then
run ruby3.2 -S passenger-config build-native-support
run setuser app ruby3.2 -S passenger-config build-native-support
Expand Down
2 changes: 2 additions & 0 deletions image/ruby_support/finalize.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ function set_rvm_default()
known_rubies=`/usr/local/rvm/bin/rvm list strings`
if [[ "$known_rubies" =~ ruby-3\.2 ]]; then
set_rvm_default ruby-3\.2
elif [[ "$known_rubies" =~ ruby-3\.3 ]]; then
set_rvm_default ruby-3\.3
elif [[ "$known_rubies" =~ ruby-3\.1 ]]; then
set_rvm_default ruby-3\.1
elif [[ "$known_rubies" =~ ruby-3\.0 ]]; then
Expand Down

0 comments on commit a53fa2d

Please sign in to comment.