Skip to content
This repository was archived by the owner on Oct 16, 2024. It is now read-only.
This repository was archived by the owner on Oct 16, 2024. It is now read-only.

Handle local gems from 'vendor/gems' #6

Open

Description

@rody

Bundler fails when the app references local development gems (in vendor/gems)

Gemfile:

source 'https://rubygems.org'
ruby '2.2.3'
(...)
gem 'my_gem', path: 'vendor/gems/my_gem'

The error I get is:

The path `/app/user/vendor/gems/my_gem` does not exist.

The problem is due to 'bundle install' running before the Dockerfile gets a chance to copy this directory (because of the ONBUILD command)

Activity

  1. johanb commented on Sep 30, 2015

    @johanb

    I have the same problem with vendor/extension. All gems with path: specified fail to install.

  2. jmervine commented on Oct 1, 2015

    @jmervine

    I solved this in local dev by adding entrypoint: ["bash","-c"] to my docker-compose.yml, however, I never run docker-compose build which is why it works. My work flow (for the first launch):

    # after adding the entrypoint above to docker-compose.yml
    local$ docker-compose run --rm web bash
    container$ rm -rf .bundle
    container$ bundle install --path .bundle
    container$ bundle exec <whatever>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions