build-image icon indicating copy to clipboard operation
build-image copied to clipboard

better handle .ruby-version or requirements.txt files with obvious misformatting

Open nolessafool opened this issue 7 years ago • 0 comments

If you were to create a .ruby-version file with the contents:

2.4.3

(note trailing newline/line feed), you'd get a deploy that looked like this:

7:52:21 AM: Attempting ruby version 2.4.3
, read from .ruby-version file
7:52:22 AM: 
7:52:22 AM: ** WARNING **
7:52:22 AM: Using custom ruby version 2.4.3
, this will slow down the build.
7:52:22 AM: To ensure fast builds, set the RUBY_VERSION environment variable, or .ruby-version file, to an included ruby version.
7:52:22 AM: Included versions: 2.4.3 2.3.6 2.2.9
7:52:22 AM: 
7:52:22 AM: Required ruby-2.4.3
 is not installed - installing.
7:52:22 AM: Searching for binary rubies, this might take some time.
7:52:22 AM: No binary rubies available for: ubuntu/14.04/x86_64/ruby-2.4.3
.
7:52:22 AM: Continuing with compilation. Please read 'rvm help mount' to get more information on binary rubies.
7:52:23 AM: Checking requirements for ubuntu.
7:52:23 AM: Requirements installation successful.
7:52:23 AM: Installing Ruby from source to: /opt/buildhome/.rvm/rubies/ruby-2.4.3
, this may take a while depending on your cpu(s)...
7:52:23 AM: ruby-2.4.3
 - #downloading ruby-2.4.3
, this may take a while depending on your connection...
7:52:23 AM: curl: (3) Illegal characters foun
7:52:23 AM: d in URL
7:52:23 AM: There was an error(3).
7:52:23 AM: Checking fallback: https://ftp.ruby-lang.org/pub/ruby/./ruby-2.4.3
.tar.bz2

note that there are a lot of "bonus" newlines in there, from output from rvm trying to install, to curl trying to pull, to tarfiles with newlines in their filename.

Similarly, if you were to put "ruby-2.4.3" in that file, or "python-3.4.0" in requirements.txt, it would fail, but we can understand what you're trying to accomplish and handle it automatically instead of failing the build with cryptic errors; we could be smarter about this :)

nolessafool avatar Sep 24 '18 21:09 nolessafool