First time for Rails v 6.0.1, Ruby v2.7.6.
Two things stand out for me. Yarn executable was not detected
, but ➜ yarn -v
shows 1.22.19. Update: I see that this is a rather old version, so will explore updating yarn. Or maybe I should just step back and revise the whole asset pipeline. I was planning to do this after deploying, but maybe should go ahead and do that rather than fiddle with yarn. And would also get rid of webpacker which seems to be causing problems, see below.
error Command "webpack" not found
. Webpacker is used in the app gem 'webpacker', '~> 5.0'
. The app works on localhost and at Heroku (which I’m migrating from).
Any ideas? Newbie to Fly and very amateur Rails user.
➜ fly deploy
Update available 0.0.387 -> v0.0.388.
Run "fly version update" to upgrade.
==> Verifying app config
--> Verified app config
==> Building image
Remote builder fly-builder-young-cloud-9276 ready
==> Creating build context
--> Creating build context done
==> Building image with Docker
--> docker host: 20.10.12 linux x86_64
[+] Building 162.7s (0/1)
[+] Building 44.3s (23/23) FINISHED
=> [internal] load remote build context 0.0s
=> copy /context / 6.9s
=> resolve image config for docker.io/docker/dockerfile:experimental 0.6s
=> CACHED docker-image://docker.io/docker/dockerfile:experimental@sha256:600e5c62eedff338b3f7a0850beb7c05866e0ef27b2d2e8c02aa468e78496ff5 0.0s
=> [internal] load metadata for quay.io/evl.ms/fullstaq-ruby:2.7.6-jemalloc-slim 0.3s
=> [base 1/6] FROM quay.io/evl.ms/fullstaq-ruby:2.7.6-jemalloc-slim@sha256:0ba2fee5088d75a213b60765a87bce731ba561b50bededa960e8bac3c99baf0c 0.0s
=> CACHED [base 2/6] RUN mkdir /app 0.0s
=> CACHED [base 3/6] WORKDIR /app 0.0s
=> CACHED [base 4/6] RUN mkdir -p tmp/pids 0.0s
=> CACHED [base 5/6] RUN curl https://get.volta.sh | bash 0.0s
=> CACHED [base 6/6] RUN volta install node@18.8.0 && volta install yarn 0.0s
=> CACHED [build_deps 1/1] RUN --mount=type=cache,id=dev-apt-cache,sharing=locked,target=/var/cache/apt --mount=type=cache,id=dev-apt-lib,sharing=locked,target=/var/lib/apt apt-get updat 0.0s
=> CACHED [gems 1/3] RUN gem install -N bundler -v 2.3.3 0.0s
=> [gems 2/3] COPY Gemfile* ./ 0.3s
=> [gems 3/3] RUN bundle install && rm -rf vendor/bundle/ruby/*/cache 20.5s
=> CACHED [stage-4 1/5] RUN --mount=type=cache,id=prod-apt-cache,sharing=locked,target=/var/cache/apt --mount=type=cache,id=prod-apt-lib,sharing=locked,target=/var/lib/apt apt-get update 0.0s
=> [stage-4 2/5] COPY --from=gems /app /app 0.6s
=> CACHED [node_modules 1/3] COPY package*json ./ 0.0s
=> CACHED [node_modules 2/3] COPY yarn.* ./ 0.0s
=> CACHED [node_modules 3/3] RUN if [ -f "yarn.lock" ]; then yarn install; elif [ -f "package-lock.json" ]; then npm install; else mkdir node_modules; fi 0.0s
=> [stage-4 3/5] COPY --from=node_modules /app/node_modules /app/node_modules 0.0s
=> [stage-4 4/5] COPY . . 4.6s
=> ERROR [stage-4 5/5] RUN bin/rails fly:build 4.0s
------
> [stage-4 5/5] RUN bin/rails fly:build:
#23 2.795 Yarn executable was not detected in the system.
#23 2.795 Download Yarn at https://yarnpkg.com/en/docs/install
#23 2.817 I, [2022-09-07T03:31:30.779057 #1] INFO -- : Writing /app/public/assets/manifest-04024382391bb910584145d8113cf35ef376b55d125bb4516cebeb14ce788597.js
#23 2.818 I, [2022-09-07T03:31:30.779943 #1] INFO -- : Writing /app/public/assets/manifest-04024382391bb910584145d8113cf35ef376b55d125bb4516cebeb14ce788597.js.gz
#23 2.818 I, [2022-09-07T03:31:30.780420 #1] INFO -- : Writing /app/public/assets/DrawTool-1c1f7325e3601283c47d1041a6bef90e94a1203860fd08d6e46536536b5841c7.png
#23 2.819 I, [2022-09-07T03:31:30.781500 #1] INFO -- : Writing /app/public/assets/down_arrow-3449825c216087a0c2d630a477104a78d834ec34116de097f87be34e03d7a816.png
#23 2.820 I, [2022-09-07T03:31:30.782058 #1] INFO -- : Writing /app/public/assets/up_arrow-94bb436b257fa40c68ef408a0bb28985d7d1389ebe0e280190dd9c0ee5890406.png
#23 2.821 I, [2022-09-07T03:31:30.782571 #1] INFO -- : Writing /app/public/assets/images/spritesheet-8e29c56b821c132a47523088cfc0f11f260b417627794f1e17bc37af52d0bbdb.png
#23 2.821 I, [2022-09-07T03:31:30.783047 #1] INFO -- : Writing /app/public/assets/images/spritesheet-2x-4a1b749c0a6201339961e17f7c8313a62e487888e7197bec29ebdd803fc6f551.png
#23 3.148 Compiling...
#23 3.937 Compilation failed:
#23 3.937 yarn run v1.22.19
#23 3.937 info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
#23 3.937
#23 3.937
#23 3.937 error Command "webpack" not found.
#23 3.937
------
Error failed to fetch an image or build from source: error building: executor failed running [/bin/bash -c bin/rails fly:build]: exit code: 1