Rails 7 deploy failing after May 11 with no changes to config or app

I haven’t made any changes to my application in almost 6 months and all of a sudden deploys are failing
It’s a fairly vanilla Rails app, version 7.0.5.

["ok"]'
==> Docs on specifying a bun version: https://render.com/docs/bun-version
==> Using Bun version  (default)
==> Docs on specifying a Node version: https://render.com/docs/node-version
JSON::ParserError: unexpected token at '==> Using Node version 19.0.0 via environment variable NODE_VERSION

The app was building and deploying fine right up until May 11 after that day the weekly deploys started failing. What happened after May 11? What can I do to get builds to work again?

1 Like

Hi,

Please could you share the URL or service name/ID of the service so we can take a look.

If you don’t want to share these details on the community forum, please feel free to raise a ticket from the “Help” or “Contact Support” links while logged into the Dashboard.

1 Like

Hi al_ps, Thanks for responding. The URL of the service is https://sommelyay.onrender.com/

1 Like

Thanks, for the service details.

Please could you try adding node --version in your build script, maybe before installing gems, to see if that allows your build to succeed.

1 Like

@edgenard Did you find a solution for this? I’m having the same issue.

@edgenard I just got a working solution from chat support. Assuming you’re using a render-build.sh script try adding ‘node --version’ to it then redeploy.

#!/usr/bin/env bash
# exit on error
set -o errexit

node --version 👈 add this line
bundle install

bundle exec rake assets:precompile
bundle exec rake assets:clean
bundle exec rake db:migrate
1 Like

That did it !Thanks @dandlessonmate and @al_ps

This also works by adding node --version; to the build command under Settings > Build & Deploy. Our complete build command is now the following:

node --version; bundle install; bundle exec rake assets:clean assets:precompile; bundle exec rake db:migrate;

(We currently don’t use a render-build.sh file)

Thank you al_ps and @danlessonmate for sharing this solution!

Please, does anyone know what happened and why this is now necessary?

The Render support clarified what happened, here’s what they wrote me:

Adding node --version forces Node to be loaded into the environment, whereas before it was loaded automatically all the time. We’ve made this change to dynamically load languages now, so if we don’t detect Node, we don’t load it into the environment. Sorry that caused any issues for you.

Please Render be careful in the future :pray:

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.