Skip to content
This repository has been archived by the owner on Sep 25, 2024. It is now read-only.

Docker Compose method does not work out of box without change to Gemfile #316

Open
mwangdakota opened this issue Jul 28, 2023 · 0 comments

Comments

@mwangdakota
Copy link

I could not get the page to build using the docker-compose method because of this issue:
https://stackoverflow.com/questions/9202324/execjs-could-not-find-a-javascript-runtime-but-execjs-and-therubyracer-are-in

I only could solve it by using the suggestion by stevec, modifying my Gemfile to:

FROM ruby:3.1.3

RUN apt-get update && \
  apt-get install --reinstall -y locales && \
  sed -i 's/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen && \
  locale-gen en_US.UTF-8

ENV LANG en_US.UTF-8
ENV LANGUAGE en_US
ENV LC_ALL en_US.UTF-8

RUN mkdir -p /app

WORKDIR /app

COPY Gemfile /app
COPY Gemfile.lock /app

RUN apt-get update
RUN apt-get install nodejs -y
RUN gem install bundler:1.17.2
RUN bundle install

EXPOSE 4000

Unsure if this the right way to go about it, however.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant