若是直接用官网的话,会有以下的错误信息,添加源、安装gem都是同样的错误,就算能连上也会很慢;linux
$ 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)
$ 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
neo@dev-All-Series: /workspace/neo $ sudo apt-get install ruby2.1-dev libicu-dev没有安装这些依赖关系时候遇到错误码以下:
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
因为家里台式机是8核16G的,配置杠杠的跑起来飞快,几分钟就安装好啦;git
neo@dev-All-Series: /workspace/neo $ sudo gem install gollum -V在这里添加-V主要是为了观察如下安装过程,也能够忽略之,更多的命令行参数的话,就直接
gem --help
查看吧;
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/Homebelieve it or not, i'm now using gollum to finish this article; LOL
直接在浏览器中输入本地127.0.0.1:4567
开启wiki之旅吧,实时预览起来挺不错的哦;若是你按照本教程刚刚安装好,那么就点击准备好的地址吧 http://127.0.0.1:4567 ;windows
【重要事情说三遍】api
不要在windows上折腾gollum!!!浏览器
不要在windows上折腾gollum!!!ruby
不要在windows上折腾gollum!!!markdown
亲身经历告诉我,在windows上折腾gollum要命还没法成功;如下简要说明如下痛苦经历:gitlab
一、为了能安装gem,须要本身下载ruby的devkit,还好在rubyinstaller网站上有;fetch
二、gollum依赖于不少库,最难装的那个依赖于icu, 因此要去icu官网下载源码本身安装;网站
三、先安装的那个鬼gem(名字很难记)编译icu常常出现找不到icu的库,须要手动设置 --with-icu-dir='/your/icu/installed/path/'
四、安装好gollum后,启动时报上面那个鬼gem的.so 加载失败,为啥呢? 定位了好久,最后看经过手动irb中require该库,而后看mkmf.log日志中的编译方法,
发现是找不到icu的库,由于编译代码用的-L. ,因此机制的我只能切换到安装icu的lib的目录下去执行gollum,竟然就启动成功了,由于对ruby不熟悉,不知道
怎么设置各类gem依赖的动态库的路径,反正设置环境变量LD_LIBRARY_PATH貌似没有效果;
五、不要高兴地太早,就算启动了gollum,去浏览器中打开地址一看,傻眼了,竟然ERROR ,,, 看命令行日志是,各类posix spawn在windows上失败,这个是硬伤啊!!!
windows伤不起,晚上回来本身机器上Ubuntu环境下几分钟搞定的事情!!!windows上陆陆续续折腾好几天啊。╮(╯▽╰)╭