GRESB / api-docs

http://gresb.github.io/api-docs/
3 stars 0 forks source link

Update Ruby and gems versions #96

Closed igorpertsev closed 2 years ago

igorpertsev commented 2 years ago

Fixes #16329 Updating ruby to 2.6.9 and fixing conflicts appearing due to it. Making sure CSS is properly loaded

joeyhorst commented 2 years ago

@jjpai does this include https://github.com/GRESB/api-docs/pull/93? Should we close that PR?

Also good to include https://github.com/GRESB/api-docs/pull/90 and https://github.com/GRESB/api-docs/pull/82 or merge those after.

@jjpai you want me to generate the api-docs on my machine and have a look or can we do this after it is rake published to http://gresb.github.io/api-docs/? I don't mind either, but the first requires me to do it on Monday.

ghost commented 2 years ago

@joeyhorst #93 is merged to this branch. #90 and #92 are not. Its good if you can verify the branch by locally running it on your local machine before we publish it.

joeyhorst commented 2 years ago

After setting up WSL 2 (windows subsystem linux) with Docker Desktop and enable it to work within the WSL 2 backend I keep hitting an issue with docker-compose build during the gem installation of mini_racer.

The Gemfile.lock shows mini_racer (0.6.2) - so it should fetch the right version.

The issue is causing middleman to fail.

It does show a warning which I'll try to resolve first


#11 0.487 Warning: the running version of Bundler (2.1.4) is older than the version that created the lockfile (2.3.11). We suggest you to upgrade to the version that created the lockfile by running `gem install bundler:2.3.11`.

EDIT: However in the Dockerfile it shows RUN gem install bundler:2.1.4

FROM ruby:2.6.9-bullseye
WORKDIR /app
COPY Gemfile* ./
RUN gem install bundler:2.1.4
RUN apt-get install bash  libxml2

ENV LANG=C.UTF-8
RUN gem install libv8 -v '3.11.8.17' -- --with-system-v8
RUN bundle install

EXPOSE 4567
CMD ["bundle", "exec", "middleman", "server", "--watcher-force-polling"]

So this should be the thing to resolve

traceback for mini_racer 0.6.2 failure ```sh #11 173.3 Fetching mini_racer 0.6.2 #11 173.4 Installing mini_racer 0.6.2 with native extensions #11 175.4 Gem::Ext::BuildError: ERROR: Failed to build gem native extension. #11 175.4 #11 175.4 current directory: #11 175.4 /usr/local/bundle/gems/mini_racer-0.6.2/ext/mini_racer_extension #11 175.4 /usr/local/bin/ruby -I /usr/local/lib/ruby/2.6.0 -r #11 175.4 ./siteconf20220412-7-117bcq5.rb extconf.rb #11 175.4 checking for -lpthread... yes #11 175.4 creating Makefile #11 175.4 #11 175.4 current directory: #11 175.4 /usr/local/bundle/gems/mini_racer-0.6.2/ext/mini_racer_extension #11 175.4 make "DESTDIR=" clean #11 175.4 #11 175.4 current directory: #11 175.4 /usr/local/bundle/gems/mini_racer-0.6.2/ext/mini_racer_extension #11 175.4 make "DESTDIR=" #11 175.4 compiling mini_racer_extension.cc #11 175.4 cc1plus: warning: command-line option ‘-Wimplicit-int’ is valid for C/ObjC but #11 175.4 not for C++ #11 175.4 cc1plus: note: unrecognized command-line option ‘-Wno-self-assign’ may have been #11 175.4 intended to silence earlier diagnostics #11 175.4 cc1plus: note: unrecognized command-line option ‘-Wno-parentheses-equality’ may #11 175.4 have been intended to silence earlier diagnostics #11 175.4 cc1plus: note: unrecognized command-line option ‘-Wno-constant-logical-operand’ #11 175.4 may have been intended to silence earlier diagnostics #11 175.4 linking shared-object mini_racer_extension.so #11 175.4 g++: error: #11 175.4 /usr/local/bundle/gems/libv8-node-16.10.0.0-x86_64-linux/vendor/v8/x86_64-linux/libv8/obj/libv8_monolith.a: #11 175.4 No such file or directory #11 175.4 make: *** [Makefile:262: mini_racer_extension.so] Error 1 #11 175.4 #11 175.4 make failed, exit code 2 #11 175.4 #11 175.4 Gem files will remain installed in /usr/local/bundle/gems/mini_racer-0.6.2 for #11 175.4 inspection. #11 175.4 Results logged to #11 175.4 /usr/local/bundle/extensions/x86_64-linux/2.6.0/mini_racer-0.6.2/gem_make.out #11 175.4 #11 175.4 An error occurred while installing mini_racer (0.6.2), and Bundler cannot #11 175.4 continue. #11 175.4 Make sure that `gem install mini_racer -v '0.6.2' --source #11 175.4 'https://rubygems.org/'` succeeds before bundling. #11 175.4 #11 175.4 In Gemfile: #11 175.4 mini_racer ------ executor failed running [/bin/sh -c bundle install]: exit code: 5 ERROR: Service 'middleman' failed to build : Build failed ```
joeyhorst commented 2 years ago

@igorpertsev I tried for hours - can you have a glance at the traceback and propose some next steps? If this is just because of the Linux versus Mac setup I wouldn't be surprised... the issue lies in installing mini_racer in the docker container.

joeyhorst commented 2 years ago

@igorpertsev pulled your commit. It now keeps hanging on libv8-node which as I understand from you includes mini_racer.

Not sure if it executes on your Mac now? I'll give it more time but probably won't execute if it is already taking 20-30 minutes.

joeyhorst@DESKTOP-CC618CP:~/api-docs$ docker-compose build
Building middleman
[+] Building 104.7s (11/12)
[+] Building 2047.4s (11/12)
 => [internal] load build definition from Dockerfile                                                                                                    0.0s
 => => transferring dockerfile: 38B                                                                                                                     0.0s
 => [internal] load .dockerignore                                                                                                                       0.0s
 => => transferring context: 2B                                                                                                                         0.0s
 => [internal] load metadata for docker.io/library/ruby:2.6.9-bullseye                                                                                  1.6s
 => [internal] load build context                                                                                                                       0.0s
 => => transferring context: 61B                                                                                                                        0.0s
 => [1/8] FROM docker.io/library/ruby:2.6.9-bullseye@sha256:c40edb661be87f7067f506e2f5c1717c8766f822c996f1b35320cc30459c65dd                            0.0s
 => CACHED [2/8] WORKDIR /app                                                                                                                           0.0s
 => CACHED [3/8] COPY Gemfile* ./                                                                                                                       0.0s
 => CACHED [4/8] RUN gem install bundler:2.1.4                                                                                                          0.0s
 => CACHED [5/8] RUN apt-get install bash  libxml2                                                                                                      0.0s
 => CACHED [6/8] RUN bundle config force_ruby_platform true                                                                                             0.0s
 => CACHED [7/8] RUN gem install libv8 -v '3.11.8.17' -- --with-system-v8                                                                               0.0s
 => [8/8] RUN bundle install                                                                                                                         2045.6s
 => => # Fetching rexml 3.2.5
 => => # Installing rexml 3.2.5
 => => # Fetching kramdown 2.3.2
 => => # Installing kramdown 2.3.2
 => => # Fetching libv8-node 16.10.0.0
 => => # Installing libv8-node 16.10.0.0 with native extensions
joeyhorst commented 2 years ago

Made a final commit

Let's rake publish