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

Netlify deploy error #1566

Closed
bjohansebas opened this issue Aug 10, 2024 · 6 comments
Closed

Netlify deploy error #1566

bjohansebas opened this issue Aug 10, 2024 · 6 comments
Labels

Comments

@bjohansebas
Copy link
Member

As has happened in the following PRs (#1565, #1563, #1562), the deploy of these pages continues to encounter the same installation error.

11:59:12 AM: build-image version: ecdc8b770f4a0193fd3f258c1bc6029e681813a4 (focal)
11:59:12 AM: buildbot version: 778f625377bd173cd306eb0b71ebeb25fdfff620
11:59:12 AM: Fetching cached dependencies
11:59:12 AM: Starting to download cache of 217.4MB
11:59:14 AM: Finished downloading cache in 1.381s
11:59:14 AM: Starting to extract cache
11:59:16 AM: Finished extracting cache in 1.939s
11:59:16 AM: Finished fetching cache in 3.376s
11:59:16 AM: Starting to prepare the repo for build
11:59:16 AM: Preparing Git Reference pull/1565/head
11:59:18 AM: Starting to install dependencies
11:59:18 AM: Python version set to 3.8
11:59:18 AM: Attempting Ruby version 2.7.2, read from environment
11:59:19 AM: Using Ruby version 2.7.2
11:59:19 AM: Started restoring cached ruby gems
11:59:19 AM: Finished restoring cached ruby gems
11:59:19 AM: Installing gem bundle
11:59:19 AM: [DEPRECATED] The `--path` flag is deprecated because it relies on being remembered across bundler invocations, which bundler will no longer do in future versions. Instead please use `bundle config set --local path '/opt/build/cache/bundle'`, and stop using this flag
11:59:19 AM: [DEPRECATED] The --binstubs option will be removed in favor of `bundle binstubs --all`
11:59:21 AM: Fetching gem metadata from https://rubygems.org/...........
11:59:21 AM: Resolving dependencies...
11:59:22 AM: Failed during stage 'Install dependencies': dependency_installation script returned non-zero exit code: 1
11:59:22 AM: Could not find compatible versions
11:59:22 AM: Because nokogiri = 1.16.2 depends on Ruby >= 3.0.0
11:59:22 AM:   and nokogiri >= 1.16.2, < 1.16.3 depends on Ruby >= 3.0, < 3.4.dev,
11:59:22 AM:   nokogiri >= 1.16.2, < 1.16.3 requires Ruby >= 3.0.0.
11:59:22 AM: So, because nokogiri = 1.16.3 depends on Ruby >= 3.0.0
11:59:22 AM:   and nokogiri >= 1.16.3, < 1.16.4 depends on Ruby >= 3.0, < 3.4.dev,
11:59:22 AM:   nokogiri >= 1.16.2, < 1.16.4 requires Ruby >= 3.0.0.
11:59:22 AM: Error during gem install
11:59:22 AM: Failing build: Failed to install dependencies
11:59:22 AM: Finished processing build request in 10.404s

Would this be a Netlify error, or is it an issue with the Ruby dependencies?

@IamLizu
Copy link
Member

IamLizu commented Aug 11, 2024

11:59:22 AM: Because nokogiri = 1.16.2 depends on Ruby >= 3.0.0
11:59:22 AM:   and nokogiri >= 1.16.2, < 1.16.3 depends on Ruby >= 3.0, < 3.4.dev,
11:59:22 AM:   nokogiri >= 1.16.2, < 1.16.3 requires Ruby >= 3.0.0.

The Ruby version in the Netlify build environment is incompatible with the version of nokogiri that github-pages or one of its dependencies is trying to install.

Perhaps we need to specify Ruby version here and in the Netlify environment and update github-pages. However, we should be careful about any other potential side effect.

@UlisesGascon
Copy link
Member

@jonchurch can you have a look to the settings? I was not able to make changes as I am not a member of the Netlify org/site project.

@carlosstenzel
Copy link
Contributor

https://www.netlify.com/blog/2020/04/02/a-step-by-step-guide-jekyll-4.0-on-netlify/

This will install the jekyll gem and create a file called Gemfile.lock. This file will ensure that Netlify always uses the same version of Jekyll that you used to build your site, thus avoiding any nasty surprises.

We’re now ready to push the site to GitHub.

would it be related to the error?

@IamLizu
Copy link
Member

IamLizu commented Aug 16, 2024

would it be related to the error?

Seems worth checking.

@bjohansebas
Copy link
Member Author

The error occurred because Netlify uses an outdated default version, causing some dependencies to fail due to lack of support for older versions. This is fixed in this PR(#1574).

Resources:
https://answers.netlify.com/t/cant-deploy-with-ruby-3-1-2/55728
https://docs.netlify.com/configure-builds/available-software-at-build-time/
https://docs.netlify.com/configure-builds/manage-dependencies/#ruby

@UlisesGascon
Copy link
Member

Thanks @bjohansebas! The deployment was fine https://github.com/expressjs/expressjs.com/actions/runs/10512038204, the issue is solved! 🥳

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

No branches or pull requests

4 participants