Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Mar 24 18:30
    ddfreyne labeled #1496
  • Mar 24 18:30
    ddfreyne closed #1496
  • Mar 24 18:30
    ddfreyne commented #1496
  • Mar 24 18:30

    ddfreyne on master

    Ignore redirects to self (misue… Style: Fix Rubocop whitespace o… Merge branch 'da2x-patch-8' (compare)

  • Mar 24 18:27

    ddfreyne on fix-more-keyword-arg-warnings

    (compare)

  • Mar 24 18:26

    ddfreyne on master

    Fix some more “Using the last a… Merge pull request #1498 from n… (compare)

  • Mar 24 18:26
    ddfreyne closed #1498
  • Mar 24 18:21
    ddfreyne commented #1479
  • Mar 24 18:20
    ddfreyne labeled #1498
  • Mar 24 18:20
    ddfreyne opened #1498
  • Mar 24 18:20

    ddfreyne on fix-more-keyword-arg-warnings

    Fix some more “Using the last a… (compare)

  • Mar 23 09:43
    iay commented #1479
  • Mar 23 01:56
    Ecco edited #1497
  • Mar 23 01:55
    Ecco edited #1497
  • Mar 23 01:54
    Ecco opened #1497
  • Mar 21 13:26
    da2x commented #1483
  • Mar 16 15:49
    da2x closed #1482
  • Mar 16 15:48
    da2x commented #1453
  • Mar 16 15:45
    da2x opened #1496
  • Mar 16 15:33
    da2x opened #247
Denis Defreyne
@ddfreyne
(and then have the output/ directory not be part of the source branch, but have the contents of master — does that make sense?)
Or rather, public/ than output/
The permission issue is weird though. What exactly does it say?
Tim Hosgood
@thosgood
yeah, i think i’ve set it up ok with a source branch for the site, and a orphan branch in the /public that pushes to master
Screenshot 2019-10-02 at 00.54.50.png
this is the message
it always appears on the first nanoc deploy, but running it again works just fine
Denis Defreyne
@ddfreyne
Huh, how strange
Does running ssh-add beforehand fix the issue?
Maybe something with SSH keys being loaded too late or so? I’m not quite sure
Tim Hosgood
@thosgood
hmm, what exactly does ssh-add do?
i’ll try it next time i build and let you know
Ian Young
@iay
ssh-add adds your ssh key to a background agent, so that things like ssh itself can run without prompting you.
Tim Hosgood
@thosgood
I don’t think ssh-add did anything
does it matter where I run it?
I ran it in public/, but guessing maybe I should have done it in /
Tim Hosgood
@thosgood
huh, makes no difference either way
Ian Young
@iay
It shouldn't matter where you run ssh-add. It pulls your key from the ~/.ssh/ directory anyway, unless you add extra command line arguments.
Tim Hosgood
@thosgood
no, still getting the same error
are there any other logs I can give? has nobody else had this problem?
I’m absolutely loving nanoc! but this is my only minor bug
should I make an issue on the repo?
Denis Defreyne
@ddfreyne
This seems to be related to Git/SSH and probably not on the Nanoc side
@thosgood Can you try out this: after running nanoc deploy and getting an error, cd into public/, then do a git push — do you get the same error then?
Tim Hosgood
@thosgood
huh, no, the git push seems to work fine
but the nanoc deploy error says that it can’t do a git pushbecause of a permissions problem
so it’s trying to do the push itself
which makes it seem even weirder to me: we run it twice, the second time there’s no error, which would imply that it has done the push, but then i still have to push by hand?
so is it just not even trying to do the push the second time or what?
and if it is, then what exactly is it pushing...
Screenshot 2019-10-09 at 03.26.19.png
Denis Defreyne
@ddfreyne
@thosgood Hmmm… what if you configure nanoc.yaml and set remote to be origin (rather than git@github…)
git push will use the default remote (which would be origin) so maybe there’s some remote funkiness
Tim Hosgood
@thosgood
yes!
that fixed it perfectly, thank you!
must have been some mistake in how I set the remote
Andri Möll
@moll
I've noticed nanoc live --live-reload often ends in a situation where an edit causes a refresh, but the refresh happens before the new version of a page has been written to disk. Live-reload therefore gets shown a 404 page. Apart from just playing with the LiveReload delay option, do we have any smarter solutions?
Andri Möll
@moll
I'm using guard-nanoc for the live command.
Seems https://github.com/ddfreyne/adsf/blob/master/adsf-live/lib/adsf/live/watcher.rb is responsible for setting up LiveReload, and it hard-codes the delay to 0, along with hard-coding the port.
I think the port should be randomized to permit multiple instances of LiveReload to be running on the same computer.
Denis Defreyne
@ddfreyne
Hmmmmm… but livereload is supposed to reload when it detects changes to the compiled site only, so maybe something else is going wrong here
Andri Möll
@moll
How does Nanoc write an output file? Straight over the existing file or does it use a temporary file with renaming?
Denis Defreyne
@ddfreyne
@moll It uses a temporary file
Andri Möll
@moll
That would explain why it's triggering LiveReload before it's finished.
If that temporary file is placed in the same output directory.
Nanoc could place it in tmp and rename from there. That'd fix early reloads. Better though probably to hook into LiveReload and trigger it once compilation is finished, but I don't know whether the LiveReload library permits that.
Denis Defreyne
@ddfreyne
Hmm no, it’s written into /tmp/* and then moved into place
Andri Möll
@moll

Mkay, I'll run inotifywait next time I'm working on my site and confirm what Nanoc's doing. Perhaps a directory gets touched (by the kernel) first, triggers inotify and LiveReload catches that.

You're claiming Nanoc's renaming files over existing files, right? It's not a delete-then-move action?

Presumably at some point the output file has to be missing entirely, otherwise the web server wouldn't report a 404.
Denis Defreyne
@ddfreyne
Hmmm, it should be in place!