Android termux installation jekyll

How to install Jekyll on android termux?

1 Like

that’s a very good question!

and all i know is that while trying to do it as advised everywhere, like in here: https://wiki.termux.com/wiki/Jekyll

i can only get the same error, always: https://github.com/termux/termux-packages/issues/2340

would appreciate an easier solution, which won’t keep breaking so much in the near future, as well!

trying it again today on a new device… using termux 0.94 from fdroid.

everything in the wiki works! that’s 90% of the good news…

now for the bad news, trying to clone my repository for actually working on it was still (as usual with *nix) a nightmare!

nokogiri, html-pipeline and libxml2 dependencies hell!!

this were the key commands missing from every guide i’ve found:

gem install pkg-config
pkg install libxslt

and these were easy enough to find from the error messages, as a few instances:

pkg upgrade
bundle update html-pipeline

only to find that bundle exec jekyll serve is broken due to some neglected jekyll bug that i could only fix with this ridiculous manual patch: https://github.com/jekyll/jekyll/issues/7045#issuecomment-394071569 which also requires termux storage access and isn’t so trivial.

that completes the sad and bad news. just about 4 hours to figure all out that last 10% of good news: ir works also with github-pages!

and if you also don’t have a physical keyboard, knowing a few extra tricks can help a lot: https://www.tecmint.com/linux-command-line-bash-shortcut-keys/amp/

enough for me today.

it’s amazing how i keep getting back to this…

here’s yet more steps that can help fixing issues with this installation:

there are many commands there that can be helpful, but here i want to briefly talk about sed:

sed -i '/def proc_version/!{s/ENOENT/ENOENT, Errno::EACCES/}' /data/data/com.termux/files/usr/lib/ruby/gems/2.7.0/gems/jekyll-3.9.0/lib/jekyll/utils/platforms.rb

be sure to update the folder according to your environment. probably jekyll-3.9.0 will be a different version, for instance.

in any case, this is specially useful for the error i got today (yet again):

/data/data/com.termux/files/usr/lib/ruby/gems/2.7.0/gems/pathutil-0.16.2/lib/pathutil.rb:502:in 'read': Permission denied @ rb_sysopen - /proc/version (Errno::EACCES)

although it does generate, instead, a warning which will need good care sooner than later:

/data/data/com.termux/files/usr/lib/ruby/gems/2.7.0/gems/pathutil-0.16.2/lib/pathutil.rb:502: warning: Using the last argument as keyword parameters is deprecated

i’ve got no idea for how long it’ll continue to work as a deprecated usage, but let’s just enjoy it while it works! :grin: