有人在win7下折腾jekyll吗?

2014-01-08 13:30:11 +08:00
 acking
ruby 2.0.0p195 (2013-05-14) [x64-mingw32] 环境以及搭建好了
运行gem install jekyll 报错,无法继续往下
porter_wrap.c:27:16: warning: cast to pointer from integer of different size
porter_wrap.c:27:16: warning: cast to pointer from integer of different size
porter_wrap.c:27:16: warning: cast to pointer from integer of different size
porter_wrap.c:27:34: warning: cast to pointer from integer of different size
porter_wrap.c:27:34: warning: cast to pointer from integer of different size
porter_wrap.c:27:34: warning: cast to pointer from integer of different size
porter_wrap.c:28:7: warning: cast to pointer from integer of different size
porter_wrap.c:28:7: warning: cast to pointer from integer of different size
porter_wrap.c:28:7: warning: cast to pointer from integer of different size
porter_wrap.c:20:17: warning: unused variable 'i'
make: *** [porter_wrap.o] Error 1

Gem files will remain installed in C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/fast-
stemmer-1.0.2 for inspection.
Results logged to C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/fast-stemmer-1.0.2/ext
/gem_make.out

检测了mkmf.log

"x86_64-w64-mingw32-gcc -o conftest.exe -IC:/Ruby200-x64/include/ruby-2.0.0/x64-mingw32 -IC:/Ruby200-x64/include/ruby-2.0.0/ruby/backward -IC:/Ruby200-x64/include/ruby-2.0.0 -I. -DFD_SETSIZE=2048 -D_WIN32_WINNT=0x0501 -D_FILE_OFFSET_BITS=64 -O3 -fno-omit-frame-pointer -fno-fast-math -g -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-field-initializers -Wunused-variable -Wpointer-arith -Wwrite-strings -Wdeclaration-after-statement -Wimplicit-function-declaration -march=native conftest.c -L. -LC:/Ruby200-x64/lib -L. -lx64-msvcrt-ruby200 -lshell32 -lws2_32 -limagehlp -lshlwapi "
checked program was:
/* begin */
1: #include "ruby.h"
2:
3: #include <winsock2.h>
4: #include <windows.h>
5: int main(int argc, char **argv)
6: {
7: return 0;
8: }
/* end */
求大神解决,百度google都无解,因为不太懂ruby。不知如何是好!!!
2893 次点击
所在节点    问与答
5 条回复
acking
2014-01-08 13:34:10 +08:00
不要沉,顶起来
caonan
2014-01-08 13:52:25 +08:00
抱歉,没遇到过。

在Windows下面搞就是自找苦吃,我上次也是遇到问题无数。

我当时是主要是:

1、含有中文的文件需要保存为UTF-8无BOM格式编码。

2. 在Ruby的安装路径找到 文件convertible.rb

C:\Ruby193\lib\ruby\gems\1.9.1\gems\jekyll-0.12.0\lib\jekyll\convertible.rb

将27行修改为:self.content = File.read(File.join(base, name), :encoding => 'utf-8')

其他暂时没遇到过
woodfish
2014-01-08 14:10:25 +08:00
http://rubyinstaller.org/downloads/ 换个编译链,下载对应的ruby和DevKit吧

Ruby 1.8.6 to 1.9.3: tdm-32-4.5.2
Ruby 2.0.0: mingw64-32-4.7.2
Ruby 2.0.0 x64 (64bits): mingw64-64-4.7.2
loading
2014-01-08 14:51:41 +08:00
如果是我装虚拟机ubuntu,我在mac上用pd全自动装,懒得折腾那么多
acking
2014-01-08 16:00:52 +08:00
@caonan 现在如果中文乱码不用修改convertible.rb文件里,只用在_config.yml文件中添加encoding: utf-8就可以了。
感谢各位,重新安装Ruby就好了。

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/96141

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX