Project

General

Profile

Actions

task #15

closed

Basic Dockerfile following installation steps fails with "Could not locate Gemfile"

Added by skunkiferous over 5 years ago. Updated over 1 year ago.

Status:
closed
Priority:
support
Assignee:
Target version:
Redmine version:
unspecified

Description

Hi.

I tried to install your plugin using an original redmine docker image, and your instructions, converted to docker commands. It does not work for me. As I know nothing about ruby, gemfiles, ..., I cannot debug the issue myself. I asked on Stackoverflow first, but got no reply so far. Here is the link to my SO question:

https://stackoverflow.com/questions/55196764/getting-could-not-locate-gemfile-installing-a-redmine-plugin-in-docker

And a copy of the question:

Trying to install a plugin in redmine, using docker. I'm new to redmine, and just know the docker basics. I have no knowledge of Ruby, so idk how those Gemfiles installations work.

I'm trying to install "Issue recurring". The installation instructions for the plugin look straightforward:

su - redmine
git -C /var/lib/redmine/plugins/ clone https://github.com/cryptogopher/issue_recurring.git
cd /var/lib/redmine
bundle install
RAILS_ENV=production rake redmine:plugins:migrate

So I tried to translate that into a Dockerfile:

FROM redmine:3.3
RUN mkdir -p /var/lib/redmine/plugins/
RUN chown -R redmine:redmine /var/lib/redmine
#su - redmine
USER redmine
RUN git -C /var/lib/redmine/plugins/ clone https://github.com/cryptogopher/issue_recurring.git
#cd /var/lib/redmine
WORKDIR /var/lib/redmine/
#bundle install
RUN bundle install
#RAILS_ENV=production rake redmine:plugins:migrate
ENV RAILS_ENV production
RUN rake redmine:plugins:migrate

But what I get is:

...
Step 7/9 : RUN bundle install
---> Running in 1139cd4ccb43
Could not locate Gemfile
The command '/bin/sh -c bundle install' returned a non-zero code: 10

Am I doing something wrong here, or is there a bug in the plugin? Being inexperienced in Ruby, I cannot tell. I tried running "bundle install" in "/var/lib/redmine/plugins/" and "/var/lib/redmine/plugins/issue-recurring/" too, but same result.

Actions #1

Updated by skunkiferous over 5 years ago

EDIT: I've researched the subject somewhat. From my newly found understanding, "bundle install" expects a "Gemfile" somewhere. There doesn't seem to be a Gemfile anywhere in you git repo, so how is it even meant to work, with or without Docker? Also, that would explain the error message, which seems to be literally the problem.

Actions #2

Updated by cryptogopher over 5 years ago

  • Status changed from new to in progress

skunkiferous wrote:

"bundle install" expects a "Gemfile" somewhere. There doesn't seem to be a Gemfile anywhere in you git repo

Redmine plugins are not required to have their own Gemfile (though they can have one if needed). I suspect that there is no Gemfile inside Redmine installation directory - /var/lib/redmine. This one is required. Try to ls /var/lib/redmine/Gemfile* to check if it is available.

In case there are still problems, please let me know what is the source of docker image you're using.

Actions #3

Updated by skunkiferous over 5 years ago

Hi. OK. I found the problem. It's not installed under /var/lib/redmine/, it's installed under "/usr/src/redmine"! I was assuming /var/lib/redmine/ is the standard directory...

Actions #4

Updated by cryptogopher over 5 years ago

  • Status changed from in progress to closed

Great that you managed to work it out!

Actions #5

Updated by admin over 1 year ago

  • Tracker changed from 3 to task
  • Target version set to unspecified
Actions

Also available in: Atom PDF