Keep .ruby_version file in Docker #523

Merged
corsonknowles merged 4 commits from use_bundler_ruby_file_feature into main 2024-03-07 23:43:18 +08:00
corsonknowles commented 2024-03-07 16:52:24 +08:00 (Migrated from github.com)
Addresses: * https://github.com/maybe-finance/maybe/pull/520#issuecomment-1982466829
zachgoll (Migrated from github.com) requested changes 2024-03-07 20:24:09 +08:00
zachgoll (Migrated from github.com) left a comment

Good catch @robzolkos, looks like this is the default for rails new now?

Good catch @robzolkos, looks like this is the default for `rails new` now?
@@ -25,7 +25,7 @@ FROM base as build
RUN apt-get install --no-install-recommends -y build-essential git libpq-dev pkg-config
zachgoll (Migrated from github.com) commented 2024-03-07 20:23:04 +08:00
COPY .ruby-version Gemfile Gemfile.lock ./
```suggestion COPY .ruby-version Gemfile Gemfile.lock ./ ```
zachgoll (Migrated from github.com) reviewed 2024-03-07 20:25:55 +08:00
@@ -25,7 +25,7 @@ FROM base as build
RUN apt-get install --no-install-recommends -y build-essential git libpq-dev pkg-config
zachgoll (Migrated from github.com) commented 2024-03-07 20:25:55 +08:00

The order of the COPY command matters here—all the source files must come before the destination, ./

The order of the `COPY` command matters here—all the source files must come before the destination, `./`
robzolkos commented 2024-03-07 22:54:26 +08:00 (Migrated from github.com)

Good catch @robzolkos, looks like this is the default for rails new now?

No rails new will spit out unchanged Dockerfile

This functionality was reverted in Rails main. I suspect largely due to it being a generator.

I think copying over the .ruby-version prior to the Gemfile should work fine. Maybe is already generated so little risk in smoothing over these edges.

> Good catch @robzolkos, looks like this is the default for `rails new` now? No `rails new` will spit out unchanged [Dockerfile](https://github.com/rails/rails/blob/main/railties/lib/rails/generators/rails/app/templates/Dockerfile.tt#L45) This functionality was [reverted](https://github.com/rails/rails/commit/707b5cb60616c86cd554ada2ef8754dd0ab5e72a) in Rails main. I suspect largely due to it being a generator. I think copying over the `.ruby-version` prior to the Gemfile should work fine. Maybe is already generated so little risk in smoothing over these edges.
zachgoll commented 2024-03-07 23:26:51 +08:00 (Migrated from github.com)

Good catch @robzolkos, looks like this is the default for rails new now?

No rails new will spit out unchanged Dockerfile

This functionality was reverted in Rails main. I suspect largely due to it being a generator.

I think copying over the .ruby-version prior to the Gemfile should work fine. Maybe is already generated so little risk in smoothing over these edges.

Ahh, hadn't seen that commit. Sounds good, and we can revisit this with more scrutiny later when implementing #295

> > Good catch @robzolkos, looks like this is the default for `rails new` now? > > No `rails new` will spit out unchanged [Dockerfile](https://github.com/rails/rails/blob/main/railties/lib/rails/generators/rails/app/templates/Dockerfile.tt#L45) > > This functionality was [reverted](https://github.com/rails/rails/commit/707b5cb60616c86cd554ada2ef8754dd0ab5e72a) in Rails main. I suspect largely due to it being a generator. > > I think copying over the `.ruby-version` prior to the Gemfile should work fine. Maybe is already generated so little risk in smoothing over these edges. Ahh, hadn't seen that commit. Sounds good, and we can revisit this with more scrutiny later when implementing #295
Sign in to join this conversation.