3

我正在尝试让 Jekyll 和 bower 在 Windows 8 中工作

我已经成功安装了 Ruby 和 DevKit,我尝试过,版本 2.0.2、1.9.3,然后再次使用来自http://railsinstaller.org/的 Rails 安装程序

我在下面遵循了场景 A 和 B,https://github.com/oneclick/rubyinstaller/wiki/Troubleshooting#wiki-gems_fails_comspec_autorun但都与我无关,

COMSPEC 是我的 cmd.exe 位置,我没有自动运行?

我可以运行gem install mysql,但尝试执行任一 rdiscount 都会给出以下结果

c:\devkit>gem install rdiscount
Temporarily enhancing PATH to include DevKit...
Building native extensions.  This could take a while...
ERROR:  Error installing rdiscount:
ERROR: Failed to build gem native extension.

C:/RailsInstaller/Ruby1.9.3/bin/ruby.exe extconf.rb
checking for random()... *** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of
necessary libraries and/or headers.  Check the mkmf.log file for more
details.  You may need configuration options.

Provided configuration options:
    --with-opt-dir
    --without-opt-dir
    --with-opt-include
    --without-opt-include=${opt-dir}/include
    --with-opt-lib
    --without-opt-lib=${opt-dir}/lib
    --with-make-prog
    --without-make-prog
    --srcdir=.
    --curdir
    --ruby=C:/RailsInstaller/Ruby1.9.3/bin/ruby
    --with-rdiscount-dir
    --without-rdiscount-dir
    --with-rdiscount-include
    --without-rdiscount-include=${rdiscount-dir}/include
    --with-rdiscount-lib
    --without-rdiscount-lib=${rdiscount-dir}/lib
C:/RailsInstaller/Ruby1.9.3/lib/ruby/1.9.1/mkmf.rb:381:in `try_do': The compiler
failed to generate an executable file. (RuntimeError)
You have to install development tools first.
    from C:/RailsInstaller/Ruby1.9.3/lib/ruby/1.9.1/mkmf.rb:461:in `try_link 0'
    from C:/RailsInstaller/Ruby1.9.3/lib/ruby/1.9.1/mkmf.rb:476:in `try_link'
    from C:/RailsInstaller/Ruby1.9.3/lib/ruby/1.9.1/mkmf.rb:619:in `try_func'
    from C:/RailsInstaller/Ruby1.9.3/lib/ruby/1.9.1/mkmf.rb:894:in `block in have_func'
    from C:/RailsInstaller/Ruby1.9.3/lib/ruby/1.9.1/mkmf.rb:790:in `block in checking_for'
    from C:/RailsInstaller/Ruby1.9.3/lib/ruby/1.9.1/mkmf.rb:284:in `block (2 levels) in postpone'
    from C:/RailsInstaller/Ruby1.9.3/lib/ruby/1.9.1/mkmf.rb:254:in `open'
    from C:/RailsInstaller/Ruby1.9.3/lib/ruby/1.9.1/mkmf.rb:284:in `block in postpone'
    from C:/RailsInstaller/Ruby1.9.3/lib/ruby/1.9.1/mkmf.rb:254:in `open'
    from C:/RailsInstaller/Ruby1.9.3/lib/ruby/1.9.1/mkmf.rb:280:in `postpone'
    from C:/RailsInstaller/Ruby1.9.3/lib/ruby/1.9.1/mkmf.rb:789:in `checking_for'
    from C:/RailsInstaller/Ruby1.9.3/lib/ruby/1.9.1/mkmf.rb:893:in `have_fun c'
    from extconf.rb:5:in `<main>'


Gem files will remain installed in C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/rdiscount-2.0.7.1 for inspection.
Results logged to C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/rdiscount-2.0.7.1/ext/gem_make.out

如果我运行,gem install jekyll我会收到以下错误

porter.c:238:4: warning: passing argument 2 of 'ends' discards 'const' qualifier from  pointer target type [enabled by default]
porter.c:182:12: note: expected 'char *' but argument is of type 'const char *'
porter.c:240:7: warning: passing argument 2 of 'ends' discards 'const' qualifier from pointer target type [enabled by default]
porter.c:182:12: note: expected 'char *' but argument is of type 'const char *' porter.c:240:7: warning: passing argument 2 of 'setto' discards 'const' qualifier from pointer target type [enabled by default]
porter.c:196:13: note: expected 'char *' but argument is of type 'const char *'
porter.c:241:7: warning: passing argument 2 of 'ends' discards 'const' qualifier
 from pointer target type [enabled by default]
porter.c:182:12: note: expected 'char *' but argument is of type 'const char *'
porter.c:241:7: warning: passing argument 2 of 'setto' discards 'const' qualifie
r from pointer target type [enabled by default]
porter.c:196:13: note: expected 'char *' but argument is of type 'const char *'
porter.c:242:7: warning: passing argument 2 of 'ends' discards 'const' qualifier
 from pointer target type [enabled by default]
porter.c:182:12: note: expected 'char *' but argument is of type 'const char *'
porter.c:242:7: warning: passing argument 2 of 'setto' discards 'const' qualifie
r from pointer target type [enabled by default]
porter.c:196:13: note: expected 'char *' but argument is of type 'const char *'
porter.c:249:7: warning: passing argument 2 of 'setto' discards 'const' qualifie
r from pointer target type [enabled by default]
porter.c:196:13: note: expected 'char *' but argument is of type 'const char *'
porter.c: In function 'step1c':
porter.c:257:4: warning: passing argument 2 of 'ends' discards 'const' qualifier
 from pointer target type [enabled by default]
porter.c:182:12: note: expected 'char *' but argument is of type 'const char *'
porter.c: In function 'step2':
porter.c:267:4: warning: passing argument 2 of 'ends' discards 'const' qualifier
 from pointer target type [enabled by default]
porter.c:182:12: note: expected 'char *' but argument is of type 'const char *'
porter.c:267:4: warning: passing argument 2 of 'r' discards 'const' qualifier fr
om pointer target type [enabled by default]
porter.c:205:13: note: expected 'char *' but argument is of type 'const char *'
porter.c:268:14: warning: passing argument 2 of 'ends' discards 'const' qualifie
r from pointer target type [enabled by default]
porter.c:182:12: note: expected 'char *' but argument is of type 'const char *'
porter.c:268:14: warning: passing argument 2 of 'r' discards 'const' qualifier f
rom pointer target type [enabled by default]
porter.c:205:13: note: expected 'char *' but argument is of type 'const char *'
porter.c:270:4: warning: passing argument 2 of 'ends' discards 'const' qualifier
 from pointer target type [enabled by default]
porter.c:182:12: note: expected 'char *' but argument is of type 'const char *'
porter.c:270:4: warning: passing argument 2 of 'r' discards 'const' qualifier fr
om pointer target type [enabled by default]
porter.c:205:13: note: expected 'char *' but argument is of type 'const char *'
porter.c:271:14: warning: passing argument 2 of 'ends' discards 'const' qualifie
r from pointer target type [enabled by default]
porter.c:182:12: note: expected 'char *' but argument is of type 'const char *'
porter.c:271:14: warning: passing argument 2 of 'r' discards 'const' qualifier f
rom pointer target type [enabled by default]
porter.c:205:13: note: expected 'char *' but argument is of type 'const char *'
porter.c:273:4: warning: passing argument 2 of 'ends' discards 'const' qualifier
 from pointer target type [enabled by default]
porter.c:182:12: note: expected 'char *' but argument is of type 'const char *'
porter.c:273:4: warning: passing argument 2 of 'r' discards 'const' qualifier fr
om pointer target type [enabled by default]
porter.c:205:13: note: expected 'char *' but argument is of type 'const char *'
porter.c:275:4: warning: passing argument 2 of 'ends' discards 'const' qualifier
 from pointer target type [enabled by default]
porter.c:182:12: note: expected 'char *' but argument is of type 'const char *'
porter.c:275:4: warning: passing argument 2 of 'r' discards 'const' qualifier fr
om pointer target type [enabled by default]
porter.c:205:13: note: expected 'char *' but argument is of type 'const char *'
porter.c:280:14: warning: passing argument 2 of 'ends' discards 'const' qualifie
r from pointer target type [enabled by default]
porter.c:182:12: note: expected 'char *' but argument is of type 'const char *'
porter.c:280:14: warning: passing argument 2 of 'r' discards 'const' qualifier f
rom pointer target type [enabled by default]
porter.c:205:13: note: expected 'char *' but argument is of type 'const char *'
porter.c:281:14: warning: passing argument 2 of 'ends' discards 'const' qualifie
r from pointer target type [enabled by default]
porter.c:182:12: note: expected 'char *' but argument is of type 'const char *'
porter.c:281:14: warning: passing argument 2 of 'r' discards 'const' qualifier f
rom pointer target type [enabled by default]
porter.c:205:13: note: expected 'char *' but argument is of type 'const char *'
porter.c:282:14: warning: passing argument 2 of 'ends' discards 'const' qualifie
r from pointer target type [enabled by default]
porter.c:182:12: note: expected 'char *' but argument is of type 'const char *'
porter.c:282:14: warning: passing argument 2 of 'r' discards 'const' qualifier f
rom pointer target type [enabled by default]
porter.c:205:13: note: expected 'char *' but argument is of type 'const char *'
porter.c:283:14: warning: passing argument 2 of 'ends' discards 'const' qualifie
r from pointer target type [enabled by default]
porter.c:182:12: note: expected 'char *' but argument is of type 'const char *'
porter.c:283:14: warning: passing argument 2 of 'r' discards 'const' qualifier f
rom pointer target type [enabled by default]
porter.c:205:13: note: expected 'char *' but argument is of type 'const char *'
porter.c:285:4: warning: passing argument 2 of 'ends' discards 'const' qualifier
 from pointer target type [enabled by default]
porter.c:182:12: note: expected 'char *' but argument is of type 'const char *'
porter.c:285:4: warning: passing argument 2 of 'r' discards 'const' qualifier fr
om pointer target type [enabled by default]
porter.c:205:13: note: expected 'char *' but argument is of type 'const char *'
porter.c:286:14: warning: passing argument 2 of 'ends' discards 'const' qualifie
r from pointer target type [enabled by default]
porter.c:182:12: note: expected 'char *' but argument is of type 'const char *'
porter.c:286:14: warning: passing argument 2 of 'r' discards 'const' qualifier f
rom pointer target type [enabled by default]
porter.c:205:13: note: expected 'char *' but argument is of type 'const char *'
porter.c:287:14: warning: passing argument 2 of 'ends' discards 'const' qualifie
r from pointer target type [enabled by default]
porter.c:182:12: note: expected 'char *' but argument is of type 'const char *'
porter.c:287:14: warning: passing argument 2 of 'r' discards 'const' qualifier f
rom pointer target type [enabled by default]
porter.c:205:13: note: expected 'char *' but argument is of type 'const char *'
porter.c:289:4: warning: passing argument 2 of 'ends' discards 'const' qualifier
 from pointer target type [enabled by default]
porter.c:182:12: note: expected 'char *' but argument is of type 'const char *'
porter.c:289:4: warning: passing argument 2 of 'r' discards 'const' qualifier fr
om pointer target type [enabled by default]
porter.c:205:13: note: expected 'char *' but argument is of type 'const char *'
porter.c:290:14: warning: passing argument 2 of 'ends' discards 'const' qualifie
r from pointer target type [enabled by default]
porter.c:182:12: note: expected 'char *' but argument is of type 'const char *'
porter.c:290:14: warning: passing argument 2 of 'r' discards 'const' qualifier f
rom pointer target type [enabled by default]
porter.c:205:13: note: expected 'char *' but argument is of type 'const char *'
porter.c:291:14: warning: passing argument 2 of 'ends' discards 'const' qualifie
r from pointer target type [enabled by default]
porter.c:182:12: note: expected 'char *' but argument is of type 'const char *'
porter.c:291:14: warning: passing argument 2 of 'r' discards 'const' qualifier f
rom pointer target type [enabled by default]
porter.c:205:13: note: expected 'char *' but argument is of type 'const char *'
porter.c:292:14: warning: passing argument 2 of 'ends' discards 'const' qualifie
r from pointer target type [enabled by default]
porter.c:182:12: note: expected 'char *' but argument is of type 'const char *'
porter.c:292:14: warning: passing argument 2 of 'r' discards 'const' qualifier f
rom pointer target type [enabled by default]
porter.c:205:13: note: expected 'char *' but argument is of type 'const char *'
porter.c:294:4: warning: passing argument 2 of 'ends' discards 'const' qualifier
 from pointer target type [enabled by default]
porter.c:182:12: note: expected 'char *' but argument is of type 'const char *'
porter.c:294:4: warning: passing argument 2 of 'r' discards 'const' qualifier fr
om pointer target type [enabled by default]
porter.c:205:13: note: expected 'char *' but argument is of type 'const char *'
porter.c:295:14: warning: passing argument 2 of 'ends' discards 'const' qualifie
r from pointer target type [enabled by default]
porter.c:182:12: note: expected 'char *' but argument is of type 'const char *'
porter.c:295:14: warning: passing argument 2 of 'r' discards 'const' qualifier f
rom pointer target type [enabled by default]
porter.c:205:13: note: expected 'char *' but argument is of type 'const char *'
porter.c:296:14: warning: passing argument 2 of 'ends' discards 'const' qualifie
r from pointer target type [enabled by default]
porter.c:182:12: note: expected 'char *' but argument is of type 'const char *'
porter.c:296:14: warning: passing argument 2 of 'r' discards 'const' qualifier f
rom pointer target type [enabled by default]
porter.c:205:13: note: expected 'char *' but argument is of type 'const char *'
porter.c:298:4: warning: passing argument 2 of 'ends' discards 'const' qualifier
 from pointer target type [enabled by default]
porter.c:182:12: note: expected 'char *' but argument is of type 'const char *'
porter.c:298:4: warning: passing argument 2 of 'r' discards 'const' qualifier fr
om pointer target type [enabled by default]
porter.c:205:13: note: expected 'char *' but argument is of type 'const char *'
porter.c: In function 'step3':
porter.c:308:4: warning: passing argument 2 of 'ends' discards 'const' qualifier
 from pointer target type [enabled by default]
porter.c:182:12: note: expected 'char *' but argument is of type 'const char *'
porter.c:308:4: warning: passing argument 2 of 'r' discards 'const' qualifier fr
om pointer target type [enabled by default]
porter.c:205:13: note: expected 'char *' but argument is of type 'const char *'
porter.c:309:14: warning: passing argument 2 of 'ends' discards 'const' qualifie
r from pointer target type [enabled by default]
porter.c:182:12: note: expected 'char *' but argument is of type 'const char *'
porter.c:309:14: warning: passing argument 2 of 'r' discards 'const' qualifier f
rom pointer target type [enabled by default]
porter.c:205:13: note: expected 'char *' but argument is of type 'const char *'
porter.c:310:14: warning: passing argument 2 of 'ends' discards 'const' qualifie
r from pointer target type [enabled by default]
porter.c:182:12: note: expected 'char *' but argument is of type 'const char *'
porter.c:310:14: warning: passing argument 2 of 'r' discards 'const' qualifier f
rom pointer target type [enabled by default]
porter.c:205:13: note: expected 'char *' but argument is of type 'const char *'
porter.c:312:4: warning: passing argument 2 of 'ends' discards 'const' qualifier
 from pointer target type [enabled by default]
porter.c:182:12: note: expected 'char *' but argument is of type 'const char *'
porter.c:312:4: warning: passing argument 2 of 'r' discards 'const' qualifier fr
om pointer target type [enabled by default]
porter.c:205:13: note: expected 'char *' but argument is of type 'const char *'
porter.c:314:4: warning: passing argument 2 of 'ends' discards 'const' qualifier
 from pointer target type [enabled by default]
porter.c:182:12: note: expected 'char *' but argument is of type 'const char *'
porter.c:314:4: warning: passing argument 2 of 'r' discards 'const' qualifier fr
om pointer target type [enabled by default]
porter.c:205:13: note: expected 'char *' but argument is of type 'const char *'
porter.c:315:14: warning: passing argument 2 of 'ends' discards 'const' qualifie
r from pointer target type [enabled by default]
porter.c:182:12: note: expected 'char *' but argument is of type 'const char *'
porter.c:315:14: warning: passing argument 2 of 'r' discards 'const' qualifier f
rom pointer target type [enabled by default]
porter.c:205:13: note: expected 'char *' but argument is of type 'const char *'
porter.c:317:4: warning: passing argument 2 of 'ends' discards 'const' qualifier
 from pointer target type [enabled by default]
porter.c:182:12: note: expected 'char *' but argument is of type 'const char *'
porter.c:317:4: warning: passing argument 2 of 'r' discards 'const' qualifier fr
om pointer target type [enabled by default]
porter.c:205:13: note: expected 'char *' but argument is of type 'const char *'
porter.c: In function 'step4':
porter.c:325:4: warning: passing argument 2 of 'ends' discards 'const' qualifier
 from pointer target type [enabled by default]
porter.c:182:12: note: expected 'char *' but argument is of type 'const char *'
porter.c:326:7: warning: passing argument 2 of 'ends' discards 'const' qualifier
 from pointer target type [enabled by default]
porter.c:182:12: note: expected 'char *' but argument is of type 'const char *'
porter.c:327:17: warning: passing argument 2 of 'ends' discards 'const' qualifie
r from pointer target type [enabled by default]
porter.c:182:12: note: expected 'char *' but argument is of type 'const char *'
porter.c:328:7: warning: passing argument 2 of 'ends' discards 'const' qualifier
 from pointer target type [enabled by default]
porter.c:182:12: note: expected 'char *' but argument is of type 'const char *'
porter.c:329:7: warning: passing argument 2 of 'ends' discards 'const' qualifier
 from pointer target type [enabled by default]
porter.c:182:12: note: expected 'char *' but argument is of type 'const char *'
porter.c:330:7: warning: passing argument 2 of 'ends' discards 'const' qualifier
 from pointer target type [enabled by default]
porter.c:182:12: note: expected 'char *' but argument is of type 'const char *'
porter.c:331:17: warning: passing argument 2 of 'ends' discards 'const' qualifie
r from pointer target type [enabled by default]
porter.c:182:12: note: expected 'char *' but argument is of type 'const char *'
porter.c:332:7: warning: passing argument 2 of 'ends' discards 'const' qualifier
 from pointer target type [enabled by default]
porter.c:182:12: note: expected 'char *' but argument is of type 'const char *'
porter.c:333:17: warning: passing argument 2 of 'ends' discards 'const' qualifie
r from pointer target type [enabled by default]
porter.c:182:12: note: expected 'char *' but argument is of type 'const char *'
porter.c:334:17: warning: passing argument 2 of 'ends' discards 'const' qualifie
r from pointer target type [enabled by default]
porter.c:182:12: note: expected 'char *' but argument is of type 'const char *'
porter.c:335:17: warning: passing argument 2 of 'ends' discards 'const' qualifie
r from pointer target type [enabled by default]
porter.c:182:12: note: expected 'char *' but argument is of type 'const char *'
porter.c:336:7: warning: passing argument 2 of 'ends' discards 'const' qualifier
 from pointer target type [enabled by default]
porter.c:182:12: note: expected 'char *' but argument is of type 'const char *'
porter.c:337:17: warning: passing argument 2 of 'ends' discards 'const' qualifie
r from pointer target type [enabled by default]
porter.c:182:12: note: expected 'char *' but argument is of type 'const char *'
porter.c:339:7: warning: passing argument 2 of 'ends' discards 'const' qualifier
 from pointer target type [enabled by default]
porter.c:182:12: note: expected 'char *' but argument is of type 'const char *'
porter.c:340:7: warning: passing argument 2 of 'ends' discards 'const' qualifier
 from pointer target type [enabled by default]
porter.c:182:12: note: expected 'char *' but argument is of type 'const char *'
porter.c:341:17: warning: passing argument 2 of 'ends' discards 'const' qualifie
r from pointer target type [enabled by default]
porter.c:182:12: note: expected 'char *' but argument is of type 'const char *'
porter.c:342:7: warning: passing argument 2 of 'ends' discards 'const' qualifier
 from pointer target type [enabled by default]
porter.c:182:12: note: expected 'char *' but argument is of type 'const char *'
porter.c:343:7: warning: passing argument 2 of 'ends' discards 'const' qualifier
 from pointer target type [enabled by default]
porter.c:182:12: note: expected 'char *' but argument is of type 'const char *'
porter.c:344:7: warning: passing argument 2 of 'ends' discards 'const' qualifier
 from pointer target type [enabled by default]
porter.c:182:12: note: expected 'char *' but argument is of type 'const char *'
compiling porter_wrap.c
In file included from c:/RailsInstaller/Ruby1.9.3/include/ruby-1.9.1/ruby/ruby.h
:1376:0,
                 from c:/RailsInstaller/Ruby1.9.3/include/ruby-1.9.1/ruby.h:32,
                 from porter_wrap.c:1:
c:/RailsInstaller/Ruby1.9.3/include/ruby-1.9.1/ruby/missing.h:41:8: error: redef
inition of 'struct timespec'
In file included from c:\devkit\mingw\bin\../lib/gcc/i686-w64-mingw32/4.7.2/../.
./../../i686-w64-mingw32/include/process.h:12:0,
                 from c:/RailsInstaller/Ruby1.9.3/include/ruby-1.9.1/ruby/win32.
h:62,
                 from c:/RailsInstaller/Ruby1.9.3/include/ruby-1.9.1/ruby/define
s.h:223,
                 from c:/RailsInstaller/Ruby1.9.3/include/ruby-1.9.1/ruby/ruby.h
:67,
                 from c:/RailsInstaller/Ruby1.9.3/include/ruby-1.9.1/ruby.h:32,
                 from porter_wrap.c:1:
c:\devkit\mingw\bin\../lib/gcc/i686-w64-mingw32/4.7.2/../../../../i686-w64-mingw
32/include/sys/types.h:89:8: note: originally defined here
In file included from c:/RailsInstaller/Ruby1.9.3/include/ruby-1.9.1/ruby/ruby.h
:1376:0,
                 from c:/RailsInstaller/Ruby1.9.3/include/ruby-1.9.1/ruby.h:32,
                 from porter_wrap.c:1:
c:/RailsInstaller/Ruby1.9.3/include/ruby-1.9.1/ruby/missing.h:48:8: error: redef
inition of 'struct timezone'
In file included from c:/RailsInstaller/Ruby1.9.3/include/ruby-1.9.1/ruby/win32.
h:63:0,
                 from c:/RailsInstaller/Ruby1.9.3/include/ruby-1.9.1/ruby/define
s.h:223,
                 from c:/RailsInstaller/Ruby1.9.3/include/ruby-1.9.1/ruby/ruby.h
:67,
                 from c:/RailsInstaller/Ruby1.9.3/include/ruby-1.9.1/ruby.h:32,
                 from porter_wrap.c:1:
c:\devkit\mingw\bin\../lib/gcc/i686-w64-mingw32/4.7.2/../../../../i686-w64-mingw
32/include/time.h:260:8: note: originally defined here
make: *** [porter_wrap.o] Error 1

Gem files will remain installed in C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9
.1/gems/fast-stemmer-1.0.2 for inspection.
Results logged to C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/fast-stem
mer-1.0.2/ext/gem_make.out

c:\devkit>

我也尝试过重新安装/更新 gem,但我所遵循的一切似乎都不起作用?

谁能想到我可以尝试的其他方法?或将我指向可以提供帮助的地方。

这是我对 Ruby 的第一次尝试,我运气不佳。

谢谢肖恩

4

2 回答 2

3

rdiscount 2.0.7.2 修复了这个问题

gem install rdiscount -v 2.0.7.2
于 2013-04-17T11:59:46.193 回答
1

问题不是 Ruby、RubyInstaller 或 DevKit,而是 RDiscount gem 在 Windows 上损坏,请参阅报告的问题 #74

您可以安装旧版本的 RDiscount,例如 1.6.x:

gem install rdiscount -v 1.6.8
于 2013-03-07T22:51:29.277 回答