mi9上termux下jekyll serve运行出错的解决办法

#电脑技术

米9手机上安装了termux后,在其中安装了jekyll,运行jekyll serve时出错:

@rb_sysopen /proc/version Permission denied.

在网上找了一圈之后,终于在github的termux项目下找到了解决办法,现抄录如下:

You can edit your local copy of jekyll-3.8.2 and patch it if you want..
From the root of your jekyll site's source-directory, find the path to your jekyll gem installation by running bundle show jekyll. 
Open the resulting path in your explorer if the directory doesn't open automatically. 
Edit jekyll-3.8.2/lib/jekyll/utils/platform.rb by replacing the proc_version method with the following: 
def proc_version 
   @proc_version ||= begin 
     Pathutil.new( 
       "/proc/version" 
     ).read 
   rescue Errno::ENOENT, Errno::EACCES
     nil 
   end 
 end

修改后,运行时一切正常。

本文共104单词

本文共829字。