I am trying to install ruby on docker. I could install the 1.9 versions but it is not possible to install the latest version such as 2.2.0 and above. I am actually trying to set up calabash on docker. Have tried this. Whenever I try to install calabash-android in it getting the error
ERROR: Error installing calabash-android:
luffa requires Ruby version >= 2.0.
Rebuild the applicationlock to the host, followed by docker compose up --build . Now, rebuild and restart the app with docker compose up --build . Inside the container, your app is running on the same port as before 3000 , but the Rails Welcome is now available on http://localhost:3001 on your local host.
Ruby is a dynamic, reflective, object-oriented, general-purpose, open-source programming language. OverviewTags.
The smallest Docker image with Ruby, is based on Alpine Linux image, which is only a 5MB image. It does only have ruby and bundler (except image with tiny tag).
You could start view a dockerfile starting with:
# 2016
FROM ruby:2.3.0
# 2020
# Import your ruby version
FROM ruby:2.7.1
# Install bundler gem
RUN gem install bundler
# Assign a work directory
WORKDIR /work
That would use the docker image ruby, with ruby already installed.
The 2020 version comes from "Ruby version management with docker" from Arjun Das, mentioned by ArMD in the comments.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With