[Linux] GIT + Gollum tools to build local WIKI editing system in Ubuntu

1 Set Taobao gem mirror

1.1 do not mirror the pain

If the direct use of the official website, it will yield the following error message, add the source, install the gem is the same mistake, even if the will can even be very slow;

$ gem sources -a https://rubygems.org/
Error fetching https://rubygems.org/:
	Errno::ECONNRESET: Connection reset by peer - SSL_connect (https://api.rubygems.org/specs.4.8.gz)

Add 1.2 Taobao gem mirrored address

$ gem sources --add https://ruby.taobao.org/ --remove https://rubygems.org/
$ gem sources -l
*** CURRENT SOURCES ***

https://ruby.taobao.org
# 请确保只有 ruby.taobao.org
$ gem install rails

2 to install the necessary libraries

neo@dev-All-Series: /workspace/neo 
$ sudo apt-get install ruby2.1-dev libicu-dev 
Without these dependencies when installing encountered an error code as follows:
ERROR: Failed to build gem native extension. /usr/bin/ruby2.1 extconf.rb mkmf.rb can’t find header files for ruby at /usr/lib/ruby/include/ruby.h

3 Installation gollum

Because the house is an 8-core desktop 16G, configuration Leverage up and running quickly, a few minutes to install Well;

neo@dev-All-Series: /workspace/neo 
$ sudo gem install gollum -V
-V added here mainly to observe the installation process, you can ignore it, the more command-line arguments, then it directly gem --help to view it;

4 trip to enjoy the local wiki

neo@dev-All-Series: /workspace/neo/gitlab/test.wiki 
$ gollum
[2016-03-17 23:37:56] INFO  WEBrick 1.3.1
[2016-03-17 23:37:56] INFO  ruby 2.1.2 (2014-05-08) [x86_64-linux-gnu]
== Sinatra (v1.4.7) has taken the stage on 4567 for development with backup from WEBrick
[2016-03-17 23:37:56] INFO  WEBrick::HTTPServer#start: pid=32446 port=4567
localhost - - [17/Mar/2016:23:38:22 CST] "GET / HTTP/1.1" 302 0
- -> /
localhost - - [17/Mar/2016:23:38:22 CST] "GET /Home HTTP/1.1" 302 0
- -> /Home
localhost - - [17/Mar/2016:23:38:22 CST] "GET /create/Home HTTP/1.1" 200 6600
- -> /create/Home
believe it or not, i'm now using gollum to finish this article; LOL

Entered directly in the browser local 127.0.0.1:4567open wiki journey, real-time preview up pretty good, oh; if you are just right in this tutorial to install, then click on the address bar ready http://127.0.0.1:4567 ;

5 Function Display

Creating pages

Preview page

 

 

 

Important things to say three times]

Do not toss gollum on the windows! ! !

Do not toss gollum on the windows! ! !

Do not toss gollum on the windows! ! !

Personal experience tells me that toss gollum death can not succeed in the windows; the following brief description of the painful experience:

1, in order to install the gem, needs its own ruby ​​download the devkit, but fortunately there are on rubyinstaller site;

2, gollum depend on many libraries, the most difficult to install that depends on the icu, so go icu official website to download the source code to install their own;

3, install the ghost gem (the name is difficult to remember) compiling icu icu often can not find the library, you need to manually set the --with-icu-dir = '/ your / icu / installed / path /'

4, installed after gollum, ghost gem of Times .so that start above fails to load, so why then? Positioning a long, last look through the manual require irb in the library, and then compilation method mkmf.log look at the log,

Found not find icu library, because the compiled code with -L., So I can only switch mechanism to the lib directory of the installation icu continue to perform gollum, actually started a success , because of ruby do not know, I do not know

How to set the path dynamic libraries rely on a variety of gem, set the environment variable LD_LIBRARY_PATH anyway, seemingly to no avail;

5, do not pleased too early, even if initiated gollum, to open the browser address a look, dumbfounded, actually ERROR ,,, look at the command line logs are various posix spawn fails on windows, this is a flawed ah ! ! !

windows can not afford injuries, come back at night under Ubuntu environment on your machine a few minutes to get things! ! ! The windows one after another toss several God. ╮ (╯ ▽ ╰) ╭

 

Reproduced in: https: //www.cnblogs.com/QuLory/p/5290184.html

Guess you like

Origin blog.csdn.net/weixin_33766168/article/details/93154368