Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Order of COPY commands doesn't allow for Gemfile's file directive #76

Closed
luizkowalski opened this issue Dec 27, 2023 · 0 comments · Fixed by #77
Closed

Order of COPY commands doesn't allow for Gemfile's file directive #76

luizkowalski opened this issue Dec 27, 2023 · 0 comments · Fixed by #77

Comments

@luizkowalski
Copy link
Collaborator

I'm trying to use ruby file: ".ruby-version" on my Gemfile so I just have one file to update Ruby's version but I noticed I can't deploy on Fly with this change, I get the error that .ruby-version does not exist.

I noticed that COPY --link Gemfile Gemfile.lock ./ happens before COPY . . so at the bundle install phase, .ruby-version file is not there yet. There are a couple of ways to fix this, either put COPY . . before running bundle (not great) or simply copy .ruby-version before (or with) copying gemfile/gemfile.lock, but there's a catch: not everyone will have this file (or maybe the file is in the gitignore/dockerignore list)

thinking if this could be fixed somehow. any ideas?

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

Successfully merging a pull request may close this issue.

1 participant