Comments (17)
@brycekahle I'm not trying to be flippant but is there a reason Netlify uses rvm over rbenv or chruby which are historically updated on stable release day or don't even require an update to support new stable releases?
A version manager not having support for a stable release nearly 3 months after it's been released seems like a good reason to go with something else in my mind.
I'm in the process of migrating something to Netlify and I'm going to have to downgrade it to Ruby 2.4 to do so due to a failed build:
12:59:39 AM: Build ready to start
12:59:41 AM: Fetching cached dependencies
12:59:41 AM: Starting to download cache of 170.9MB
12:59:42 AM: Finished downloading cache in 883.255288ms
12:59:42 AM: Starting to extract cache
12:59:45 AM: Finished extracting cache in 3.179455588s
12:59:46 AM: Finished fetching cache in 4.41758893s
12:59:46 AM: Starting to prepare the repo for build
12:59:46 AM: Preparing Git Reference refs/heads/master
12:59:47 AM: Starting build script
12:59:47 AM: Installing dependencies
12:59:47 AM: Started restoring cached node version
12:59:49 AM: Finished restoring cached node version
12:59:49 AM: v8.10.0 is already installed.
12:59:50 AM: Now using node v8.10.0 (npm v5.6.0)
12:59:50 AM: Required ruby-2.5.0 is not installed.
12:59:50 AM: To install do: 'rvm install "ruby-2.5.0"'
12:59:50 AM: Attempting ruby version 2.5.0, read from .ruby-version file
12:59:51 AM:
12:59:51 AM: ** WARNING **
12:59:51 AM: Using custom ruby version 2.5.0, this will slow down the build.
12:59:51 AM: To ensure fast builds, set the RUBY_VERSION environment variable, or .ruby-version file, to an included ruby version.
12:59:51 AM: Included versions: 2.2.9 2.4.3 2.3.6
12:59:51 AM:
12:59:51 AM: Required ruby-2.5.0 is not installed - installing.
12:59:51 AM: Searching for binary rubies, this might take some time.
12:59:53 AM: Found remote file https://rubies.travis-ci.org/ubuntu/14.04/x86_64/ruby-2.5.0.tar.bz2
12:59:53 AM: Checking requirements for ubuntu.
12:59:53 AM: Requirements installation successful.
12:59:53 AM: ruby-2.5.0 - #configure
12:59:53 AM: ruby-2.5.0 - #download
12:59:56 AM: No checksum for downloaded archive, recording checksum in user configuration.
12:59:56 AM: ruby-2.5.0 - #validate archive
1:00:00 AM: ruby-2.5.0 - #extract
1:00:02 AM: ruby-2.5.0 - #validate binary
1:00:03 AM: ruby-2.5.0 - #setup
1:00:03 AM: ruby-2.5.0 - #gemset created /opt/buildhome/.rvm/gems/ruby-2.5.0@global
1:00:03 AM: ruby-2.5.0 - #importing gemset /opt/buildhome/.rvm/gemsets/global.gems
1:00:03 AM: there was an error installing gem rubygems-bundler
1:00:03 AM: ..........................................
1:00:03 AM: ruby-2.5.0 - #generating global wrappers
1:00:03 AM: ........
1:00:03 AM: Error running 'run_gem_wrappers_regenerate',
1:00:04 AM: please read /opt/buildhome/.rvm/log/1520744403_ruby-2.5.0/gemset.wrappers.global.log
1:00:04 AM: ruby-2.5.0 - #gemset created /opt/buildhome/.rvm/gems/ruby-2.5.0
1:00:04 AM: ruby-2.5.0 - #importing gemsetfile /opt/buildhome/.rvm/gemsets/default.gems evaluated to empty gem list
1:00:04 AM: ruby-2.5.0 - #generating default wrappers
1:00:04 AM: ........
1:00:04 AM: Error running 'run_gem_wrappers_regenerate',
1:00:04 AM: please read /opt/buildhome/.rvm/log/1520744404_ruby-2.5.0/gemset.wrappers.default.log
1:00:04 AM: Using /opt/buildhome/.rvm/gems/ruby-2.5.0
1:00:04 AM: /opt/buildhome/.rvm/scripts/override_gem: /opt/buildhome/.rvm/rubies/ruby-2.5.0/bin/gem: /home/travis/.rvm/rubies/ruby-2.5.0/bin/ruby: bad interpreter: No such file or directory
1:00:04 AM: Using ruby version 2.5.0
1:00:04 AM: /opt/buildhome/.rvm/scripts/override_gem: /opt/buildhome/.rvm/rubies/ruby-2.5.0/bin/gem: /home/travis/.rvm/rubies/ruby-2.5.0/bin/ruby: bad interpreter: No such file or directory
1:00:04 AM: Error installing bundler
1:00:04 AM: Error running command: Build script returned non-zero exit code: 1
1:00:04 AM: Failing build: Failed to build site
1:00:04 AM: failed during stage 'building site': Build script returned non-zero exit code: 1
1:00:05 AM: Finished processing build request in 24.394172301s
from build-image.
@envygeeks , the upstream binaries for 2.5.0 are broken for everyone. see this issue in rvm : rvm/rvm#4291 (comment)
Netlify could roll their own binaries, in their own docker, with there own workarounds to the bug, but that is extra technical debt and only helps Netlify. The problem needs to be fixed upstream, and thankfully that should be happening soon.
from build-image.
It looks like rvm
hasn't released their version that supports 2.5.0: https://github.com/rvm/rvm/blob/master/CHANGELOG.md
from build-image.
There is also this issue: rvm/rvm#4291
from build-image.
@olivierlacan I'm not a ruby dev, so please correct me if I'm wrong:
- rbenv: installs all versions of ruby from source. This takes far too long to include dynamic version installation in a build.
- chruby: does not support installing ruby.
It does appear ruby-install
supports binary installs, so that might be worth considering alongside rbenv/chruby
.
from build-image.
@brycekahle Sorry for the lack of details.
rbenv is coupled with ruby-build for installation and you're right that it doesn't currently support binary installs: rbenv/ruby-build#42
chruby is coupled with ruby-install (confusing, I know) and doesn't support binary installs either AFAIK: postmodern/ruby-install#138
So you may be stuck indeed. Let's try to put some wind in those RVM sails I guess.
from build-image.
rvm
has added 2.5.0 to master (unreleased) ; see rvm/rvm#4265
There is also this issue: rvm/rvm#4291
That one is still open.
from build-image.
@jayvdb That issue, and the fact they haven't done a proper release is what is blocking for us.
from build-image.
Then at least allow users to force disable-binary if they wish? Netlify is the reason I get so many emails, or have bug reports for things that aren't even bugs. I've no want to support 2.4 because it doesn't have top level return, define_method is private, and so many other problems... now I have to consider reverting modern changes because users have no out for 2.4 being the latest version, and there is no backup.
from build-image.
We've been in contact with the upstream maintainers of the rvm binaries for Ubuntu, and they have identified the problem. The maintainer is currently on holiday, but hopefully we can get the fix released when they return.
from build-image.
I don't want to blame anyone, but I am curious as I am moving my site to Netlify...is it usual to have such a long time between a release and support for a Ruby version? I tried to downgrade to 2.4.2, and apparently it doesn't work either and tells me it's falling back to 2.3.6.
Anything we can do to help? I guess the issue is that no one else than RVM has binary releases, is that it?
from build-image.
from build-image.
btw it is possible to get 2.5.1 working.
to do that, make your build command gem install bundler && foo
where foo is your normal build command.
from build-image.
Why not have your Docker images supply the binaries on the image itself ahead of time with automation? This can easily be achieved with any CI.
from build-image.
Automating Ruby binaries into a Docker image, rolling them out, and in on automatic builds is not "technical debt", that's an abused term. While it would require more work upfront, it would have both solved, and prevented this issue from ever happening, and allowed people to move to a different Ruby version faster than RVM can manage.
This ticket is filed in December of last year, that's not "soon", RVM is the technical debt.
from build-image.
Not sure why this was closed.
from build-image.
This is done. Will be deployed early next week.
from build-image.
Related Issues (20)
- Customizable Java version HOT 2
- Latest NPM versions throw an error when workspaces are configured HOT 1
- Missing workdir "/opt/build" in build container.
- Change the way how the elm compiler is installed as it is not compatible with arm64 HOT 2
- Why is the Hugo version out of date so much?
- Add Haldo linting to build image dockerfile HOT 1
- Run the docker image size inside CircleCI instead of github actions
- Container-structure-tests fail for arm64 HOT 2
- Create multiarch images and push them to the dockerhub HOT 5
- Cache Playwright browser dependencies HOT 3
- `target` directory for Rust is not stored
- Local build test fails with podman HOT 1
- Builds fail when using `[email protected]` HOT 5
- Same codebase stopped compiling in version 4.13 HOT 4
- Monorepo project cannot found pnpm HOT 2
- Failed to debug netlify locally HOT 1
- Add Support for .NET 7 HOT 6
- `NETLIFY_USE_PNPM: true` environment var not working after v4.15.0 HOT 1
- Show an understandable error when `getBuildInfo` failed
- Not respecting pnpm version specified in packageManager field of package.json HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from build-image.