Skip to content
This repository was archived by the owner on Jan 25, 2023. It is now read-only.

add ruby 2.5.0 #123

Closed
fool opened this issue Dec 28, 2017 · 17 comments
Closed

add ruby 2.5.0 #123

fool opened this issue Dec 28, 2017 · 17 comments
Labels
feat/builds medium-priority type: feature code contributing to the implementation of a feature and/or user facing functionality

Comments

@fool
Copy link
Contributor

fool commented Dec 28, 2017

Released on 🎄 day: https://www.ruby-lang.org/en/news/2017/12/25/ruby-2-5-0-released/

@brycekahle
Copy link
Contributor

It looks like rvm hasn't released their version that supports 2.5.0: https://github.com/rvm/rvm/blob/master/CHANGELOG.md

@brycekahle
Copy link
Contributor

There is also this issue: rvm/rvm#4291

@olivierlacan
Copy link

olivierlacan commented Mar 11, 2018

@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

@brycekahle
Copy link
Contributor

@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.

@olivierlacan
Copy link

@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.

@jayvdb
Copy link

jayvdb commented Apr 5, 2018

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.

@brycekahle
Copy link
Contributor

@jayvdb That issue, and the fact they haven't done a proper release is what is blocking for us.

@envygeeks
Copy link

envygeeks commented Apr 19, 2018

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.

@brycekahle
Copy link
Contributor

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.

@jipiboily
Copy link

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?

@fool
Copy link
Contributor Author

fool commented Jun 9, 2018 via email

@jayvdb
Copy link

jayvdb commented Jun 9, 2018

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.

@envygeeks
Copy link

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.

@jayvdb
Copy link

jayvdb commented Jun 9, 2018

@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.

@envygeeks
Copy link

envygeeks commented Jun 9, 2018

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.

@bcomnes
Copy link
Contributor

bcomnes commented Nov 20, 2018

Not sure why this was closed.

@bcomnes bcomnes reopened this Nov 20, 2018
@bcomnes
Copy link
Contributor

bcomnes commented Feb 16, 2019

This is done. Will be deployed early next week.

@bcomnes bcomnes closed this as completed Feb 16, 2019
@verythorough verythorough added the type: feature code contributing to the implementation of a feature and/or user facing functionality label Feb 23, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feat/builds medium-priority type: feature code contributing to the implementation of a feature and/or user facing functionality
Projects
None yet
Development

No branches or pull requests

8 participants