我很难安装我的Ruby Project要求的宝石(基于Cucumber和SitePrism的自动测试,但我不认为这是相关的)。
输出提示了本机扩展的问题,但我确实已安装了Devkit,并且以前没有任何麻烦。
$ gem install oily_png -v '1.1.2'
Temporarily enhancing PATH to include DevKit...
Building native extensions. This could take a while...
ERROR: Error installing oily_png:
ERROR: Failed to build gem native extension.
c:/Ruby193/bin/ruby.exe -r ./siteconf20150430-6252-1aexxhi.rb extconf.rb
creating Makefile
make clean
Makefile:165: *** target pattern contains no `%'. Stop.
make
Makefile:165: *** target pattern contains no `%'. Stop.
make failed, exit code 2
Gem files will remain installed in
c:/Ruby193/lib/ruby/gems/1.9.1/gems/oily_png-1.1.2 for inspection.
Results logged to
c:/Ruby193/lib/ruby/gems/1.9.1/extensions/x86-mingw32/1.9.1/oily_png-1.1.2/gem_make.out
gem_make.out
的内容(双关语?)日志文件如下
c:/Ruby193/bin/ruby.exe extconf.rb
creating Makefile
make clean
make
generating oily_png-i386-mingw32.def
compiling color.c
compiling oily_png_ext.c
oily_png_ext.c: In function 'Init_oily_png':
oily_png_ext.c:13:3: warning: ISO C90 forbids mixed declarations and code
oily_png_ext.c:17:3: warning: ISO C90 forbids mixed declarations and code
oily_png_ext.c:21:3: warning: ISO C90 forbids mixed declarations and code
oily_png_ext.c:30:3: warning: ISO C90 forbids mixed declarations and code
compiling operations.c
operations.c: In function 'oily_png_compose_bang':
operations.c:28:3: warning: ISO C90 forbids mixed declarations and code
operations.c:41:3: warning: ISO C90 forbids mixed declarations and code
operations.c:51:3: warning: ISO C90 forbids mixed declarations and code
operations.c: In function 'oily_png_replace_bang':
operations.c:84:3: warning: ISO C90 forbids mixed declarations and code
operations.c:97:3: warning: ISO C90 forbids mixed declarations and code
operations.c:107:3: warning: ISO C90 forbids mixed declarations and code
compiling png_decoding.c
png_decoding.c: In function 'oily_png_decode_filter_up':
png_decoding.c:20:3: warning: ISO C90 forbids mixed declarations and code
png_decoding.c: In function 'oily_png_decode_scanline_grayscale_1bit':
png_decoding.c:98:3: warning: ISO C90 forbids mixed declarations and code
png_decoding.c: In function 'oily_png_decode_scanline_grayscale_2bit':
png_decoding.c:110:3: warning: ISO C90 forbids mixed declarations and code
png_decoding.c: In function 'oily_png_decode_scanline_grayscale_4bit':
png_decoding.c:122:3: warning: ISO C90 forbids mixed declarations and code
png_decoding.c: In function 'oily_png_decode_scanline_grayscale_8bit':
png_decoding.c:134:3: warning: ISO C90 forbids mixed declarations and code
png_decoding.c: In function 'oily_png_decode_scanline_grayscale_16bit':
png_decoding.c:146:3: warning: ISO C90 forbids mixed declarations and code
png_decoding.c: In function 'oily_png_decode_scanline_grayscale_alpha_8bit':
png_decoding.c:158:3: warning: ISO C90 forbids mixed declarations and code
png_decoding.c: In function 'oily_png_decode_scanline_grayscale_alpha_16bit':
png_decoding.c:170:3: warning: ISO C90 forbids mixed declarations and code
png_decoding.c: In function 'oily_png_decode_scanline_truecolor_8bit':
png_decoding.c:210:3: warning: ISO C90 forbids mixed declarations and code
png_decoding.c: In function 'oily_png_decode_scanline_truecolor_16bit':
png_decoding.c:222:3: warning: ISO C90 forbids mixed declarations and code
png_decoding.c: In function 'oily_png_decode_scanline_truecolor_alpha_8bit':
png_decoding.c:234:3: warning: ISO C90 forbids mixed declarations and code
png_decoding.c: In function 'oily_png_decode_scanline_truecolor_alpha_16bit':
png_decoding.c:246:3: warning: ISO C90 forbids mixed declarations and code
png_decoding.c: In function 'oily_png_decode_png_image_pass':
png_decoding.c:336:5: warning: ISO C90 forbids mixed declarations and code
png_decoding.c:340:5: warning: ISO C90 forbids mixed declarations and code
png_decoding.c:346:5: warning: ISO C90 forbids mixed declarations and code
png_decoding.c:351:5: warning: ISO C90 forbids mixed declarations and code
compiling png_encoding.c
png_encoding.c: In function 'oily_png_encode_filter_up':
png_encoding.c:15:3: warning: ISO C90 forbids mixed declarations and code
png_encoding.c: In function 'oily_png_encode_scanline_grayscale_1bit':
png_encoding.c:53:3: warning: ISO C90 forbids mixed declarations and code
png_encoding.c: In function 'oily_png_encode_scanline_grayscale_2bit':
png_encoding.c:72:3: warning: ISO C90 forbids mixed declarations and code
png_encoding.c: In function 'oily_png_encode_scanline_grayscale_4bit':
png_encoding.c:86:3: warning: ISO C90 forbids mixed declarations and code
png_encoding.c: In function 'oily_png_encode_scanline_grayscale_8bit':
png_encoding.c:98:3: warning: ISO C90 forbids mixed declarations and code
png_encoding.c: In function 'oily_png_encode_scanline_grayscale_alpha_8bit':
png_encoding.c:109:3: warning: ISO C90 forbids mixed declarations and code
png_encoding.c: In function 'oily_png_encode_scanline_truecolor_8bit':
png_encoding.c:161:3: warning: ISO C90 forbids mixed declarations and code
png_encoding.c: In function 'oily_png_encode_scanline_truecolor_alpha_8bit':
png_encoding.c:172:3: warning: ISO C90 forbids mixed declarations and code
png_encoding.c: In function 'oily_png_encode_png_image_pass_to_stream':
png_encoding.c:247:3: warning: ISO C90 forbids mixed declarations and code
png_encoding.c:257:3: warning: ISO C90 forbids mixed declarations and code
png_encoding.c:262:3: warning: ISO C90 forbids mixed declarations and code
png_encoding.c:275:3: warning: ISO C90 forbids mixed declarations and code
compiling resampling.c
resampling.c: In function 'oily_png_generate_steps_residues':
resampling.c:23:3: warning: ISO C90 forbids mixed declarations and code
resampling.c: In function 'oily_png_canvas_steps':
resampling.c:48:3: warning: ISO C90 forbids mixed declarations and code
resampling.c:57:3: warning: ISO C90 forbids mixed declarations and code
resampling.c: In function 'oily_png_canvas_steps_residues':
resampling.c:75:3: warning: ISO C90 forbids mixed declarations and code
resampling.c:89:3: warning: ISO C90 forbids mixed declarations and code
resampling.c:107:3: warning: ISO C90 forbids mixed declarations and code
resampling.c: In function 'oily_png_canvas_resample_nearest_neighbor_bang':
resampling.c:130:3: warning: ISO C90 forbids mixed declarations and code
resampling.c:136:7: warning: ISO C90 forbids mixed declarations and code
resampling.c: In function 'oily_png_canvas_resample_bilinear_bang':
resampling.c:173:3: warning: ISO C90 forbids mixed declarations and code
linking shared-object oily_png/oily_png.so
make install
/usr/bin/install -c -m 0755 oily_png.so c:/Ruby193/lib/ruby/gems/1.9.1/gems/oily_png-1.1.2/ext/oily_png/.gem.20150430-4216-fq2e2a/oily_png
installing default oily_png libraries
,但我只能看到警告,它们都没有给我铃。
我正在使用Windows。具体来说,Windows 8.1 Enterprise X64
一段时间后,我在rubygems github
上找到了这个问题建议的解决方案之一是将红宝石降级到2.3(我安装了2.4)
gem update --system 2.3.0
这解决了我和我的bundle
成功完成的问题。