Skip to content
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.

Website / docs build breaking due to Jekyll/Ruby version update #17918

Closed
aaronmarkham opened this issue Mar 27, 2020 · 2 comments · Fixed by #17927
Closed

Website / docs build breaking due to Jekyll/Ruby version update #17918

aaronmarkham opened this issue Mar 27, 2020 · 2 comments · Fixed by #17927

Comments

@aaronmarkham
Copy link
Contributor

Description

Local docs builds are breaking. Production is working fine and will stay that way until the docker cache gets invalidated and it tries to build the site again. When it does it'll hit this issue and website/docs publishing will be blocked.

Error Message

Step 10/23 : RUN source /etc/profile.d/rvm.sh &&     rvm requirements &&     rvm install 2.6 &&     rvm use 2.6.3 --default
 ---> Running in e633769ea98c
mesg: ttyname failed: Inappropriate ioctl for device
Checking requirements for ubuntu.
Installing requirements for ubuntu.
Updating system..
Installing required packages: gawk, autoconf, automake, bison, libffi-dev, libgdbm-dev, libncurses5-dev, libsqlite3-dev, libtool, libyaml-dev, pkg-config, sqlite3, libgmp-dev, libreadline6-dev, libssl-dev..................
Requirements installation successful.
Searching for binary rubies, this might take some time.
Found remote file https://rubies.travis-ci.org/ubuntu/16.04/x86_64/ruby-2.6.5.tar.bz2
Checking requirements for ubuntu.
Requirements installation successful.
ruby-2.6.5 - #configure
ruby-2.6.5 - #download
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100 18.0M  100 18.0M    0     0  18.6M      0 --:--:-- --:--:-- --:--:-- 18.6M
No checksum for downloaded archive, recording checksum in user configuration.
ruby-2.6.5 - #validate archive
ruby-2.6.5 - #extract
ruby-2.6.5 - #validate binary
ruby-2.6.5 - #setup
ruby-2.6.5 - #gemset created /usr/local/rvm/gems/ruby-2.6.5@global
ruby-2.6.5 - #importing gemset /usr/local/rvm/gemsets/global.gems..................................
ruby-2.6.5 - #generating global wrappers.......
ruby-2.6.5 - #gemset created /usr/local/rvm/gems/ruby-2.6.5
ruby-2.6.5 - #importing gemsetfile /usr/local/rvm/gemsets/default.gems evaluated to empty gem list
ruby-2.6.5 - #generating default wrappers.......
Required ruby-2.6.3 is not installed.
To install do: 'rvm install "ruby-2.6.3"'
The command '/bin/bash -l -c source /etc/profile.d/rvm.sh &&     rvm requirements &&     rvm install 2.6 &&     rvm use 2.6.3 --default' returned a non-zero code: 1
Traceback (most recent call last):
  File "ci/build.py", line 454, in <module>
    sys.exit(main())
  File "ci/build.py", line 364, in main
    num_retries=args.docker_build_retries, no_cache=args.no_cache)
  File "ci/build.py", line 116, in build_docker
    run_cmd()
  File "/home/ubuntu/aaron-mxnet/ci/util.py", line 84, in f_retry
    return f(*args, **kwargs)
  File "ci/build.py", line 114, in run_cmd
    check_call(cmd)
  File "/usr/lib/python3.5/subprocess.py", line 581, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['docker', 'build', '-f', 'docker/Dockerfile.build.ubuntu_cpu_jekyll', '--build-arg', 'USER_ID=1000', '--build-arg', 'GROUP_ID=1000', '--cache-from', 'mxnetci/build.ubuntu_cpu_jekyll', '-t', 'mxnetci/build.ubuntu_cpu_jekyll', 'docker']' returned non-zero exit status 1

To Reproduce

(If you developed your own code, please provide a short script that reproduces the error. For existing examples, please provide link.)

Steps to reproduce

(Paste the commands you ran that produced the error.)

  1. ci/build.py --docker-registry mxnetci --platform ubuntu_cpu_lite /work/runtime_functions.sh build_ubuntu_cpu_docs
  2. ci/build.py --docker-registry mxnetci --platform ubuntu_cpu_jekyll /work/runtime_functions.sh build_jekyll_docs

What have you tried to solve it?

  1. Nada yet
  2. Probably try to force it to install the previous version... or upgrade it so it all works.
@aaronmarkham
Copy link
Contributor Author

I think we need to specify the Ruby version 2.6.3 in the Gemfile, and regenerate the Gemfile.lock.
https://devcenter.heroku.com/articles/ruby-versions
I don't know what is requiring 2.6.3. But setting it as that should keep us from getting 2.6.5 instead and getting past this error.

aaronmarkham added a commit to aaronmarkham/incubator-mxnet that referenced this issue Mar 27, 2020
@aaronmarkham
Copy link
Contributor Author

The fix was accomplished this way:

Step 1: Setup rvm

  1. Install packages
sudo apt-get install software-properties-common
sudo apt-add-repository -y ppa:rael-gc/rvm
sudo apt-get update
sudo apt-get install rvm
echo 'source "/etc/profile.d/rvm.sh"' >> ~/.bashrc
  1. Logout. Login.
  2. Test running rvm.
  3. Change directories to incubator-mxnet/docs/static_site/src important

Step 2: Setup Ruby

  1. Install Ruby 2.6.5
rvm install '2.6.5'
  1. Use Ruby 2.6.5
rvm use '2.6.5'

Step 3: Setup bundler2

gem update --system
gem install bundler:2.0.2

Step 4: update the Gemfile

  1. Edit Gemfile and add ruby "2.6.5" under source "https://rubygems.org"
  2. Update the Gemfile.lock file
bundler update --bundler

Then well after I went down a rabbit hole of updating Jekyll, I realized the 2.6.3 setting was coming from the Dockerfile. So anytime this happens again... you have to check:

  • the dockerfile for jekyll
  • the _config.yml files
  • the Gemlock file
  • and regen the Gemlock.lock file

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

Successfully merging a pull request may close this issue.

2 participants