docker-android icon indicating copy to clipboard operation
docker-android copied to clipboard

Ubuntu 20.04 does not support Ruby v3 and latest bundler (2.5+)

Open tuncaulubilge opened this issue 1 year ago • 5 comments

Latest version of bundler (2.5.0 and above), requires Ruby version >= 3.0.0. However, the community image for android is using Ubuntu 20.04 which does not support versions of ruby newer than 2.7.0

Here is the current error we see when installing bundler (Using fastlane for both iOS and android builds):

ERROR:  Error installing bundler:
	The last version of bundler (>= 0) to support your Ruby & RubyGems was 2.4.22. Try installing it with `gem install bundler -v 2.4.22`
	bundler requires Ruby version >= 3.0.0. The current ruby version is 2.7.0.0.

We can bypass this issue by adding -v 2.4.22 during gem install but it would be great to have a future proof solution that allows us to use newer Ruby and bundler versions.

tuncaulubilge avatar Jan 04 '24 15:01 tuncaulubilge

This image is for building Android, why do you need Ruby/Bundler?

cortinico avatar Jan 04 '24 16:01 cortinico

We use fastlane to build the Android app as well as the iOS apps, and use bundler to install fastlane as the recommended installation method.

tuncaulubilge avatar Jan 04 '24 16:01 tuncaulubilge

I see. We strive to keep this image as smaller as possible and don't account for all the possible use cases.

I'm happy to review a PR that will bump the image to Ubuntu 22.04 which will solve your issue.

cortinico avatar Jan 04 '24 17:01 cortinico

Thanks @cortinico, the PR is good to go 👍 https://github.com/react-native-community/docker-android/pull/216

tuncaulubilge avatar Jan 08 '24 15:01 tuncaulubilge

I see the PR merged but not auto-deployed. I suspect this might be the reason: https://github.com/react-native-community/docker-android/pull/217

tuncaulubilge avatar Jan 09 '24 12:01 tuncaulubilge