Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • May 28 09:50
    ddfreyne commented #1544
  • May 28 09:34

    ddfreyne on 4.12.2

    (compare)

  • May 28 09:34

    ddfreyne on main

    Add release notes for 4.12.2 Set version to 4.12.2 (compare)

  • May 28 09:15
    ddfreyne closed #1544
  • May 28 09:14
    ddfreyne commented #1544
  • May 28 09:13

    ddfreyne on main

    Drop support for Ruby 2.5 (EOL) Merge branch 'drop-ruby-2-5' in… Add video/@poster to SELECTORS and 1 more (compare)

  • May 28 09:05
    ddfreyne commented #1544
  • May 21 08:36

    ddfreyne on bundler

    (compare)

  • May 21 08:36

    ddfreyne on main

    Bump nokogiri from 1.11.3 to 1.… Merge pull request #256 from na… (compare)

  • May 21 08:36
    ddfreyne closed #256
  • May 17 21:41
    dependabot[bot] labeled #256
  • May 17 21:41
    dependabot[bot] opened #256
  • May 17 21:41

    dependabot[bot] on bundler

    Bump nokogiri from 1.11.3 to 1.… (compare)

  • May 17 02:43
    mh61503891 opened #1544
  • May 10 20:04
    iay commented #1541
  • May 10 19:11
    iay commented #1541
  • Apr 30 20:41

    ddfreyne on main

    Upgrade gems Auto-link GitLab MRs Upgrade gems and 4 more (compare)

  • Apr 30 20:38

    ddfreyne on bundler

    (compare)

  • Apr 30 20:38

    ddfreyne on main

    Bump rexml from 3.2.4 to 3.2.5 … Merge pull request #255 from na… (compare)

  • Apr 30 20:38
    ddfreyne closed #255
Denis Defreyne
@ddfreyne
@gpakosz I use Nanoc as-is. I have tried it with Docker on a Mac, but the Docker for Mac filesystem is SO SLOW that compilation times got 10x–20x worse or so.
Gregory Pakosz
@gpakosz
@ddfreyne I want to provide a Docker file for some Windows users (despite I recommend WSL). What would use as an entry point?
It seems to me I need to come up with a wrapper script that calls bundle install. Not sure yet how to know bundle install should be called
Gregory Pakosz
@gpakosz
Not sure yet how to know when bundle install should be called
Denis Defreyne
@ddfreyne
@gpakosz I think the way I’ve done it in the past is calling bundle install when building the Docker image. In the Dockerfile, you have a bundle install --path=vendor/bundle
The entrypoint I would keep as-is… I generally try to not change it
Gregory Pakosz
@gpakosz
yeah that's what I'm wondering. Is bundle install part of provisioning the container or not
as far as I understand, if Gemfile changes I have to remember rebuilding the Docker image
Denis Defreyne
@ddfreyne
Indeed
Denis Defreyne
@ddfreyne
@gpakosz Fun coincidence — I ended up writing a Dockerfile that does bundle install just yesterday!
(For a side project that I’m involved in… working a sunday hehe)
You probably want something like this:
FROM ruby:2.6-slim-buster

ENV LC_ALL C.UTF-8

RUN apt update
RUN apt install -y build-essential

RUN gem update --system
RUN gem update
RUN gem install bundler

RUN mkdir /app
WORKDIR /app

ADD Gemfile /app/Gemfile
ADD Gemfile.lock /app/Gemfile.lock
RUN bundle install --without=test,development

ADD . /app
Gregory Pakosz
@gpakosz
did almost the same
instead of /app I used /nanoc which I mount to host's PWD
and now I'm heading towards separating /nanoc (mounted with -v "$PWD:/nanoc") and the place where gems are installed
because it may make no sense to install gem in a host path
and I don't want the gems to be part of the provisioning, so I'm using this entrypoint
#!/bin/sh

set -e

hr() {
  printf "%.0s—" $(seq 1 80)
  printf '\n'
}

bundle config set --local deployment true
bundle config set --local path .bundle
bundle config set --local without development

if ! bundle check 2>/dev/null; then
  hr
  printf "Installing gems...\n"
  bundle install
  printf 'done.\n'
  hr
fi

exec bundle exec nanoc "$@"
@ddfreyne btw will you make a release soon? with the timeout fix
Gregory Pakosz
@gpakosz
what are gem update --system and gem update for?
Gregory Pakosz
@gpakosz
Hmm I thought all the Ruby 2.7 warnings were solved
/home/vagrant/.bundle/ruby/2.7.0/gems/nanoc-cli-4.11.16/lib/nanoc/cli/commands/show-plugins.rb:17: warning: already initialized constant Nanoc::CLI::Commands::ShowPlugins::PLUGIN_CLASS_ORDER
/home/vagrant/.bundle/ruby/2.7.0/gems/nanoc-cli-4.11.16/lib/nanoc/cli/commands/show-plugins.rb:17: warning: previous definition of PLUGIN_CLASS_ORDER was here
/home/vagrant/.bundle/ruby/2.7.0/gems/nanoc-cli-4.11.16/lib/nanoc/cli/commands/show-plugins.rb:22: warning: already initialized constant Nanoc::CLI::Commands::ShowPlugins::PLUGIN_CLASSES
/home/vagrant/.bundle/ruby/2.7.0/gems/nanoc-cli-4.11.16/lib/nanoc/cli/commands/show-plugins.rb:22: warning: previous definition of PLUGIN_CLASSES was here
/home/vagrant/.bundle/ruby/2.7.0/gems/nanoc-cli-4.11.16/lib/nanoc/cli/commands/view.rb:19: warning: already initialized constant Nanoc::CLI::Commands::View::DEFAULT_HANDLER_NAME
/home/vagrant/.bundle/ruby/2.7.0/gems/nanoc-cli-4.11.16/lib/nanoc/cli/commands/view.rb:19: warning: previous definition of DEFAULT_HANDLER_NAME was here
3 replies
Gregory Pakosz
@gpakosz
damn docker fs is so slow
running nanoc live from within the container is not really bearable
Denis Defreyne
@ddfreyne
I think I told you that the Docker filesystem is unbearably slow :D
Sad but true
Gregory Pakosz
@gpakosz
even bundle exec nanoc view takes ages to start :(
Gregory Pakosz
@gpakosz
I don't remember is Nanoc's tmp dir configurable?
Gregory Pakosz
@gpakosz
Also did something changed with nanoc view?
previously, when using Vagrant, I could forward port 3000 from host to guest guest
and just launch $ bundle exec nanoc view
now I need to do $ bundle exec nanoc view -o 0.0.0.0
Gregory Pakosz
@gpakosz
in that respect I wish cri was able to read options from environment variables
3 replies
Denis Defreyne
@ddfreyne
I think nanoc view defaults to binding to localhost only
(which makes sense from a security point of view)
Gregory Pakosz
@gpakosz
which doesn't make sense for a dev tool
I mean who serves a site with nanoc view?
:)
Gregory Pakosz
@gpakosz
does nanoc view still require adsf?
and what to do when trying to connect live reload yields Cannot download livereload.js
Gregory Pakosz
@gpakosz
hmm seems to be caused by
#<Thread:0x00007f98a1d07280 /usr/local/lib/ruby/gems/2.7.0/gems/guard-livereload-2.5.2/lib/guard/livereload/reactor.rb:11 run> terminated with exception (report_on_exception is true):
/usr/local/lib/ruby/gems/2.7.0/gems/eventmachine-1.2.7/lib/eventmachine.rb:531:in `start_tcp_server'14:17:51 - INFO - Guard is now watching at '/Users/greedo/Projects/myscript_sdk/doc'
: no acceptor (port is in use or requires root privileges) (RuntimeError)
        from /usr/local/lib/ruby/gems/2.7.0/gems/eventmachine-1.2.7/lib/eventmachine.rb:531:in `start_server'
        from /usr/local/lib/ruby/gems/2.7.0/gems/guard-livereload-2.5.2/lib/guard/livereload/reactor.rb:51:in `block in _start_reactor'
        from /usr/local/lib/ruby/gems/2.7.0/gems/eventmachine-1.2.7/lib/eventmachine.rb:171:in `run'
        from /usr/local/lib/ruby/gems/2.7.0/gems/guard-livereload-2.5.2/lib/guard/livereload/reactor.rb:50:in `_start_reactor'
        from /usr/local/lib/ruby/gems/2.7.0/gems/guard-livereload-2.5.2/lib/guard/livereload/reactor.rb:11:in `block in initialize'
I'm using bundle exec nanoc live -L -V
apparently I can't use nanoc live -L if I have guard live reload
it's both logical and so confusing
Gregory Pakosz
@gpakosz
Also @ddfreyne , a bigger timeout doesn't always help
I'm still hitting
Magick::ImageMagickError: unable to open image `/vagrant/output/images/convert-batch.png': No such file or directory @ error/blob.c/OpenBlob/2874

Current item: /tools/inktool/overview.md (:default representation)

  0. _factory/lib/images.rb:43:in `ping'
  1. _factory/lib/images.rb:43:in `image'
  2. item /tools/inktool/overview.md (rep default):185:in `get_binding'
Item A depends on Image B. And Item A's compilation tries to open image in output/ before it has arrived
I'm not sure if you commented that already but imho when an item A depends on a binary item B, the only correct option is to wait for item B to arrive in output/ before launching compilation of item A. Is it what Nanoc is currently doing?
2 replies
Gregory Pakosz
@gpakosz
damn and guard doesn't work with Vagrant :(
Gregory Pakosz
@gpakosz
is there a way I can ask nanoc live to launch guard -p to force polling ?
Denis Defreyne
@ddfreyne
@gpakosz I think in that case, I’d run nanoc live and guard separately
nanoc live (the one that is provided by guard-nanoc) is a thin wrapper around both
Gregory Pakosz
@gpakosz
you meant nanoc view and guard?