I have a separate ruby project which i need to interact as an end point
The problem is that installing with rbenv and rvm is failling. for rbenv its because its not supported, for rvm its the same problem am having with my docker
Error running '__rvm_make -j4',
214.9 please read /usr/local/rvm/log/1719922831_ruby-2.5.3/make.log
But i want to use a dockerfile to manage dependancies and run the project with just rails s in the docker image
This is my Dockerfile
# Use an official Ubuntu base image
FROM ubuntu:24.04
# Install dependencies
RUN apt update && apt install -y
curl
ca-certificates
git
build-essential
libssl-dev
libreadline-dev
zlib1g-dev
autoconf
bison
libncurses5-dev
libffi-dev
libgdbm-dev
gnupg2
gawk
libsqlite3-dev
libtool
libyaml-dev
pkg-config
sqlite3
libgmp-dev
# Download and import GPG keys required for RVM
RUN gpg --keyserver hkp://keyserver.ubuntu.com --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB ||
(curl -sSL https://rvm.io/mpapis.asc | gpg --import - &&
curl -sSL https://rvm.io/pkuczynski.asc | gpg --import -)
# Download RVM installer script
RUN curl -sSL https://get.rvm.io -o rvm-installer
# Install RVM
RUN bash rvm-installer
# Source RVM scripts
RUN echo 'source /etc/profile.d/rvm.sh' >> /etc/bash.bashrc
# Reload shell for RVM
SHELL ["/bin/bash", "-l", "-c"]
# Install Ruby 2.5.3 with verbose output for debugging
RUN rvm install 2.5.3 --verbose
# Set Ruby 2.5.3 as default
RUN rvm use 2.5.3 --default
# Install Bundler
RUN gem install bundler
# Set up the working directory
WORKDIR /app
# Copy the Gemfile and Gemfile.lock
COPY Gemfile Gemfile.lock ./
# Install gems
RUN bundle install
# Copy the rest of the application code
COPY . .
# Expose port 3000
EXPOSE 3000
# Command to start the application
CMD ["bash", "-l", "-c", "source /etc/profile.d/rvm.sh && rails s -b 0.0.0.0"]
But am getting an error on step 7: # Install Ruby 2.5.3 with verbose output for debugging
RUN rvm install 2.5.3 --verbose
no matter the script its failing there and producing this error
214.9 Error running '__rvm_make -j4',
214.9 please read /usr/local/rvm/log/1719922831_ruby-2.5.3/make.log
ERROR: failed to solve: process "/bin/bash -l -c rvm install 2.5.3 --verbose" did not complete successfully: exit code: 2
enter image description here
I have tried to install ruby 2.5.3 using the rmv and rbenv
have tried lots of modification to terminal scripts
have tried removing all ruby related files
have also try installing it with high preveledges