Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • 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
  • Apr 30 20:30
    dependabot[bot] labeled #255
  • Apr 30 20:30
    dependabot[bot] opened #255
  • Apr 30 20:30

    dependabot[bot] on bundler

    Bump rexml from 3.2.4 to 3.2.5 … (compare)

  • Apr 09 18:08
    ddfreyne labeled #1543
  • Apr 05 09:55

    ddfreyne on 4.12.1

    Always write stack trace backwa… Merge branch 'stack-trace-alway… Expand paths in a more backward… and 5 more (compare)

  • Apr 05 09:55

    ddfreyne on 4.12.0

    (compare)

  • Apr 05 09:54

    ddfreyne on main

    Always write stack trace backwa… Merge branch 'stack-trace-alway… Expand paths in a more backward… and 5 more (compare)

  • Apr 05 09:53

    ddfreyne on 4.12.1

    (compare)

  • Apr 05 09:15
    ddfreyne commented #1543
  • Apr 05 09:14
    ddfreyne commented #1543
  • Apr 05 09:04

    ddfreyne on bundler

    (compare)

  • Apr 05 09:03

    ddfreyne on main

    Bump kramdown from 2.3.0 to 2.3… Merge pull request #254 from na… (compare)

  • Apr 05 09:03
    ddfreyne closed #254
  • Apr 04 08:53

    ddfreyne on main

    Upgrade Rubocop (compare)

Gregory Pakosz
@gpakosz
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?
Denis Defreyne
@ddfreyne
Yep, sorry
Harald
@a4z

what it the 'trick' in the blogging extension, why the question if items are frozen, and if, the data gets assigned to a variable just to return that

      blk = -> { @items.select { |item| item[:kind] == 'article' } }
      if @items.frozen?
        @article_items ||= blk.call
      else
        blk.call
      end

I can understsand that there might be some caching wanted, and that the result is returned if it exists
or does this something different?
but why the items.frozen question ? if this is not the case there is no caching, when is which branch relevant?