x無法存取,你可能沒有權限或未登入。
B65024a818a1283259729da5481f388f

octopress在ubuntu10.04下部署不成功

2011-12-01 16:32:33 +0800ypchenOctopress 節點 中發起
最後由 geekontheway2011-12-05 13:44:34 +0800回應 , 717次閱讀

按照官方doc说的做的 rake generate这步就不成功 请问各位这是怎么回事呢

root@ypchen-ubuntu:~/octopress# rake generate
## Generating Site with Jekyll
unchanged sass/screen.scss
/usr/local/rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/psych.rb:148:in `parse': couldn't parse YAML at line 20 column 0 (Psych::SyntaxError)
    from /usr/local/rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/psych.rb:148:in `parse_stream'
    from /usr/local/rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/psych.rb:119:in `parse'
    from /usr/local/rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/psych.rb:106:in `load'
    from /usr/local/rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/psych.rb:205:in `load_file'
    from /usr/local/rvm/gems/ruby-1.9.2-p290/gems/jekyll-0.11.0/lib/jekyll.rb:119:in `configuration'
    from /usr/local/rvm/gems/ruby-1.9.2-p290/gems/jekyll-0.11.0/bin/jekyll:207:in `<top (required)>'
    from /usr/local/rvm/gems/ruby-1.9.2-p290/bin/jekyll:19:in `load'
    from /usr/local/rvm/gems/ruby-1.9.2-p290/bin/jekyll:19:in `<main>'   

截至 2011-12-05 13:44:34 +0800,共收到 15 條回應
0349b4c4ac27f1b692f05ac40bc4517a
WanCW 1樓, 於2011-12-01 16:35:53 +0800回應

應該是文章前的 YAML 中,冒號後面少了空格?

B65024a818a1283259729da5481f388f
ypchen 2樓, 於2011-12-01 16:42:21 +0800回應

#1楼 @WanCW 这是第一次安装 还没有文章 我没改动什么文件 除了 _config.yml

0349b4c4ac27f1b692f05ac40bc4517a
WanCW 3樓, 於2011-12-01 17:06:19 +0800回應

#2楼 @ypchen 那應該是相同的問題,只是發生在你的 _config.yml 中。

B65024a818a1283259729da5481f388f
ypchen 4樓, 於2011-12-01 17:10:11 +0800回應

#3楼 @WanCW 真是奇了怪了 在ubuntu下折腾一天了没解决 然后跑到windows下 居然成功了
似乎rake的时候 应该用 bundle exec rake代替

PS. 我用的是RailsInstaller套件

D41d8cd98f00b204e9800998ecf8427e
匿名 5樓, 於2011-12-01 17:51:05 +0800回應

我之前也是因為_config.yml 冒號後面沒有空格 出現這個錯誤訊息~~

fails:
twitter_user:juanito
ok:
twitter_user: juanito

B65024a818a1283259729da5481f388f
ypchen 6樓, 於2011-12-02 13:46:45 +0800回應

#5楼 @Juanito 我就没有修改 _config.yml

B65024a818a1283259729da5481f388f
ypchen 7樓, 於2011-12-02 13:47:58 +0800回應

#3楼 @WanCW 这次又试了一下在ubuntu下 不修改_config.yml下任何地方

B65024a818a1283259729da5481f388f
ypchen 9樓, 於2011-12-03 10:56:47 +0800回應

#8楼 @Juanito 谢谢 我会尝试一下的

B65024a818a1283259729da5481f388f
ypchen 10樓, 於2011-12-04 15:03:24 +0800回應

#1楼 @WanCW 我又重新进行了一遍整个过程 发现在安装ruby的时候 有下面的问题

root@ypchen-ubuntu:~/dev# rvm install 1.9.2 -C --with-openssl-dir=$HOME/.rvm/usr,--with-iconv-dir=$HOME/.rvm/usr 
Installing Ruby from source to: /usr/local/rvm/rubies/ruby-1.9.2-p290, this may take a while depending on your cpu(s)...

ruby-1.9.2-p290 - #fetching 
ruby-1.9.2-p290 - #extracted to /usr/local/rvm/src/ruby-1.9.2-p290 (already extracted)
Fetching yaml-0.1.4.tar.gz to /usr/local/rvm/archives
Extracting yaml-0.1.4.tar.gz to /usr/local/rvm/src
Configuring yaml in /usr/local/rvm/src/yaml-0.1.4.
Compiling yaml in /usr/local/rvm/src/yaml-0.1.4.
ERROR: Error running 'make ', please read /usr/local/rvm/log/ruby-1.9.2-p290/yaml/make.log
Installing yaml to /usr/local/rvm/usr
ERROR: Error running 'make install', please read /usr/local/rvm/log/ruby-1.9.2-p290/yaml/make.install.log
ruby-1.9.2-p290 - #configuring 
ruby-1.9.2-p290 - #compiling 
ruby-1.9.2-p290 - #installing 
Removing old Rubygems files...
Installing rubygems-1.8.10 for ruby-1.9.2-p290 ...
Installation of rubygems completed successfully.
ruby-1.9.2-p290 - adjusting #shebangs for (gem irb erb ri rdoc testrb rake).
ruby-1.9.2-p290 - #importing default gemsets (/usr/local/rvm/gemsets/)
Install of ruby-1.9.2-p290 - #complete 

在编译yaml的时候有ERROR

0349b4c4ac27f1b692f05ac40bc4517a
WanCW 11樓, 於2011-12-04 19:42:20 +0800回應

#10楼 @ypchen 你有看過 error log 了嗎?

B65024a818a1283259729da5481f388f
ypchen 12樓, 於2011-12-05 09:17:33 +0800回應

make.log的内容如下

[2011-12-04 14:57:40] make 
CDPATH="${ZSH_VERSION+.}:" && cd . && /bin/bash /usr/local/rvm/src/yaml-0.1.4/config/missing --run aclocal-1.11 
 cd . && /bin/bash /usr/local/rvm/src/yaml-0.1.4/config/missing --run automake-1.11 --foreign
src/Makefile.am:2: Libtool library used but `LIBTOOL' is undefined
src/Makefile.am:2:   The usual way to define `LIBTOOL' is to add `AC_PROG_LIBTOOL'
src/Makefile.am:2:   to `configure.ac' and run `aclocal' and `autoconf' again.
src/Makefile.am:2:   If `AC_PROG_LIBTOOL' is in `configure.ac', make sure
src/Makefile.am:2:   its definition is in aclocal's search path.
make: *** [Makefile.in] 错误 1

make.install.log内容如下

[2011-12-04 14:57:42] make install
 cd . && /bin/bash /usr/local/rvm/src/yaml-0.1.4/config/missing --run automake-1.11 --foreign
src/Makefile.am:2: Libtool library used but `LIBTOOL' is undefined
src/Makefile.am:2:   The usual way to define `LIBTOOL' is to add `AC_PROG_LIBTOOL'
src/Makefile.am:2:   to `configure.ac' and run `aclocal' and `autoconf' again.
src/Makefile.am:2:   If `AC_PROG_LIBTOOL' is in `configure.ac', make sure
src/Makefile.am:2:   its definition is in aclocal's search path.
make: *** [Makefile.in] 错误 1

0349b4c4ac27f1b692f05ac40bc4517a
WanCW 13樓, 於2011-12-05 12:48:59 +0800回應

#12楼 @ypchen 我不熟 Ubuntu,但看起來是因為沒裝 libtool?試試看-

sudo aptitude install libtool

Ref: http://paulgoscicki.com/archives/2011/11/ruby-1-9-2-via-rvm-installation-woes/

B65024a818a1283259729da5481f388f
ypchen 14樓, 於2011-12-05 13:28:51 +0800回應

#13楼 @WanCW 这次成功了 果然是WanCW说的那个问题 谢谢各位了

9a8cb668611685adf49a745d90090f87
geekontheway 15樓, 於2011-12-05 13:44:34 +0800回應

肯定是_config.yml的问题,你可以看看yaml的语法,要求很严格

需要 登入 後方可回應,如果你還沒有帳號按這裡 註冊