GIT+Gollum Builds Local WIKI Editing System under Ubuntu

Keywords: Ruby Windows sudo GitLab

1 Setting up gem image of Taobao

1.1 Pain without Mirror

If you use the official website directly, there will be the following error messages, add source, install gem are the same error, even if it can be connected will 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)

1.2 Add Taobao gem mirror address

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

https://ruby.taobao.org
# Make sure that only ruby.taobao.org is available
$ gem install rails

2 Install the necessary Libraries

neo@dev-All-Series: /workspace/neo 
$ sudo apt-get install ruby2.1-dev libicu-dev 
Error codes encountered when these dependencies are not installed are 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 Install gollum

Because the desktop computer at home is 8 cores and 16G, it runs very fast with bars and bars. It will be installed in a few minutes.

neo@dev-All-Series: /workspace/neo 
$ sudo gem install gollum -V
The main purpose of adding - V here is to observe the following installation process, which can also be ignored. If there are more command line parameters, just Gem - help to see it directly.

4 Enjoy the local wiki Tour

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

Enter local 127.0.0.1:4567 directly into the browser to start the wiki tour. Real-time preview is very good. If you just installed it according to this tutorial, click on the prepared address. http://127.0.0.1:4567

5 Functional Display

Create pages

Preview page

 

 

 

Say important things three times.

Don't toss gollum on windows!!!

Don't toss gollum on windows!!!

Don't toss gollum on windows!!!

My personal experience tells me that it is not yet possible to succeed in tossing gollum on windows. Here is a brief description of the following painful experiences:

1. In order to install gem, you need to download ruby's devkit by yourself. Fortunately, it is available on Ruby installer website.

2. Goldlum relies on many libraries. The hardest one to install depends on icu. So we need to download the source code and install it on icu's official website.

3. The ghost gem installed first often fails to find the library of ICU when compiling ICU. It needs to be set manually - with-icu-dir='/your/icu/installed/path/'

4. After installing gollum, the. so load of the ghost gem on the startup time failed. Why? Located for a long time, finally look at the require Library in manual irb, and then look at the compilation method in the mkmf.log log log.

I found that I couldn't find the library of icu, because - L.. Was used to compile the code, so I could only switch to the directory of lib which installed icu to execute gollum, and it started successfully, because I was not familiar with ruby, and I didn't know it.

How to set the paths of various gem-dependent dynamic libraries? Setting the environment variable LD_LIBRARY_PATH seems ineffective anyway.

5. Don't be happy too early, even if you start gollum, go to the browser to open the address, foolish eyes, actually ERROR,, look at the command line log, all kinds of posix spawn failed on windows, this is a hard wound!!!

windows can't hurt, come back to your machine in the evening under Ubuntu environment for a few minutes to get things done!!! windows has been tossing around for several days. ()

 

Reprinted at: https://www.cnblogs.com/QuLory/p/5290184.html

Posted by stonefish on Thu, 20 Jun 2019 18:02:40 -0700