[fastpages] speed up bundler install of nokogiri?

For the past hour my local run of the make server script has been stuck at…

jekyll_1     | Installing nokogiri 1.11.3 (x86_64-linux)

The nokogiri page says "“This installation should only take a few seconds”…Yeah, I’ve been waiting an hour for make server to get past that line above.

I see that people typically circumvent this issue by forcing bundler to use system libraries when building nokogiri, but I’m not sure if the .bundle/config file in my fastpages blog directory is even checked:

$ cat .bundle/config
---
BUNDLE_BUILD__NOKOGIRI: "--use-system-libraries"

…the make server script doesn’t seem to indicate that it’s doing anything different when I run with this enabled.

Can anyone suggest a way to make this make go quicker?

(starting make server again and going to bed; hope it finishes by the time I wake up!)

Obligatory question: “Have you updated to the latest fastpages?” No I have not. :crazy_face: How about I try that first. :wink:

EDIT: 1 hour 15 minutes later and it finished. :partying_face:

Just tried a brand-new fastpages template, and I’m finding that make server works exactly once on my local machine. The second time I try to make anything, the same set of permission errors occurs.

I did a git clone of the blog to my local machine, went in the directory and ran make server. Then I stopped it with Ctrl-C (as I have in the past), then I wait to let it shut down gracefully. But after that, it won’t start again:

$ make server
chmod -R u+rw .
chmod: changing permissions of './images/copied_from_nb/my_icons': Operation not permitted
chmod: changing permissions of './images/copied_from_nb/my_icons/fastai_logo.png': Operation not permitted
chmod: changing permissions of './settings.ini': Operation not permitted
chmod: changing permissions of './_posts/2020-02-20-test.md': Operation not permitted
make: *** [Makefile:53: .FORCE] Error 1

or

$ make build
chmod -R u+rw .
chmod: changing permissions of './images/copied_from_nb/my_icons': Operation not permitted
chmod: changing permissions of './images/copied_from_nb/my_icons/fastai_logo.png': Operation not permitted
chmod: changing permissions of './settings.ini': Operation not permitted
chmod: changing permissions of './_posts/2020-02-20-test.md': Operation not permitted
make: *** [Makefile:53: .FORCE] Error 1

Has something crucial changed, @hamelsmu ? I didn’t see anything in the development guide about needing to run make as root. But I notice that in my older version of the blog, the Makefile target .FORCE was blank, whereas now it’s got that chmod call.

I’ve now tried three checkouts, and each will allow me to run make server once, but after that, no more make-ing allowed.

For now, I guess I’ll just comment out the chmod below .FORCE …? :man_shrugging:

Ok if you comment it out does it work? What operating system are you on?

Yes, commenting out the chmod works.

I found out what the issue is: Somewhere in the first make server build, a couple files get written as belonging to user root and group root (which prior to the make had either belonged to me – i.e. belonged my user account – or had not existed):

$ ls -l * | grep root
-rw-r--r-- 1 root    root     1346 Apr 22 21:00 settings.ini
-rw-r--r--  1 root    root    2877305 Apr 22 21:00 2020-02-20-test.md

These are what cause the chmod to fail.
Strange that the permission escalates to root without ever prompting me for my sudo password. ?? (I run make server with my user account.)

I’m on Linux, Ubuntu 20.04.