ziprubyãRuby1.9.3ã§ã¯ã¤ã³ã¹ãã¼ã«åºæ¥ãªã â åºæ¥ãï¼ã¤ã³ã¹ãã¼ã«æ¹æ³ã¯æå¾ã«è¿½è¨ï¼
proglangã«ã¦1.9.3ã«Rubyãã¢ããã°ã¬ã¼ããããããä¸é¨ã®gemãå ¥ãç´ãå¿ è¦ãåºã¦ãããä»äºã§ãã使ãziprubyã1.9.3ã§æ¹ãã¦å ¥ããªããã¾ããããããªããããã¦ã¤ã³ã¹ãã¼ã«ããããã¨æã£ããåºé¼»ãæ«ãããã¨ããä¸è¨ã®ã¨ã©ã¼ã
C:\> gem install zipruby Fetching: zipruby-0.3.6.gem (100%) ERROR: Error installing zipruby: The 'zipruby' native gem requires installed build tools. Please update your PATH to include build tools or download the DevKit from 'http://rubyinstaller.org/downloads' and follow the instructions at 'http://github.com/oneclick/rubyinstaller/wiki/Development-Kit'
ã¨ã©ã¼ã¡ãã»ã¼ã¸ãè¦ãããªãã»ã©ãDevKitãå¿ è¦ã¨ãããã¨ããã¨ãããã¨ã§ã表示ãããURLã«é£ãã§ãDevKitãªããã®ãå ¥ãã¦ã¿ãã以ä¸ãDevelopment Kit · oneclick/rubyinstaller Wiki · GitHub ã®ã³ããã
- Downloads ã®ãã¼ã¸ãããDevKitã®mingw64çããã¦ã³ãã¼ã
- å®è¡ãã¦ãé©å½ãªãã©ã«ãã«å±é
- ã³ãã³ãããã³ãããããã®ãã©ã«ãã«ç§»åãã³ãã³ãããã³ããããRubyãå¼ã¹ãããã«ãã¹ã¯è¨å®æ¸ã¿ã
- ruby dk.rb init ãå®è¡ãã§ãããã£ãconfig.ymlãã¿ã¦ãRuby1.9.3ã®ãã¹ãå ¥ã£ã¦ããã¨ã確èª
- ruby dk.rb review ãå®è¡ãconfig.ymlããã§ãã¯ãããããã§ãRuby1.9.3ã®ãã¹ãã§ã¦ãããã¨ãå確èª
- ruby dk.rb install ãå®è¡ãä¸ã®ãããªè¡¨ç¤ºãã§ããå¤åOK.
[INFO] Updating convenience notice gem override for 'D:/J-drive/developments/environments/Ruby_1.9.3' [INFO] Installing 'D:/J-drive/developments/environments/Ruby_1.9.3/lib/ruby/site_ruby/devkit.rb'
- jsonã®gemãã¤ã³ã¹ãã¼ã«ã ãgem install json --platform=rubyã
- ããã«jsonã使ããã確èªããruby -rubygems -e "require 'json'; JSON.load('[42]').inspect"ãçµæã¯[42]ã¨ãªãã¯ã
ãã¦ããã§ãã£ã¨åºæ¥ãã¯ãã¨æã£ã¦ãgem install zipruby --platform=rubyã¨ãããã以ä¸ã®ã¨ã©ã¼ãåºã¦ä½¿ããªãã¾ã¾ã ãã©ããzlib.hã足ããªãããã ãããã
$ gem install zipruby Temporarily enhancing PATH to include DevKit... Building native extensions. This could take a while... ERROR: Error installing zipruby: ERROR: Failed to build gem native extension. D:/J-drive/developments/environments/Ruby_1.9.3/bin/ruby.exe extconf.rb checking for zlib.h... *** 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=D:/J-drive/developments/environments/Ruby_1.9.3/bin/ruby D:/J-drive/developments/environments/Ruby_1.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 D:/J-drive/developments/environments/Ruby_1.9.3/lib/ruby/1.9.1/mkmf.rb:506:in `try_cpp' from D:/J-drive/developments/environments/Ruby_1.9.3/lib/ruby/1.9.1/mkmf.rb:931:in `block in have_header' from D:/J-drive/developments/environments/Ruby_1.9.3/lib/ruby/1.9.1/mkmf.rb:790:in `block in checking_for' from D:/J-drive/developments/environments/Ruby_1.9.3/lib/ruby/1.9.1/mkmf.rb:284:in `block (2 levels) in postpone' from D:/J-drive/developments/environments/Ruby_1.9.3/lib/ruby/1.9.1/mkmf.rb:254:in `open' from D:/J-drive/developments/environments/Ruby_1.9.3/lib/ruby/1.9.1/mkmf.rb:284:in `block in postpone' from D:/J-drive/developments/environments/Ruby_1.9.3/lib/ruby/1.9.1/mkmf.rb:254:in `open' from D:/J-drive/developments/environments/Ruby_1.9.3/lib/ruby/1.9.1/mkmf.rb:280:in `postpone' from D:/J-drive/developments/environments/Ruby_1.9.3/lib/ruby/1.9.1/mkmf.rb:789:in `checking_for' from D:/J-drive/developments/environments/Ruby_1.9.3/lib/ruby/1.9.1/mkmf.rb:930:in `have_header' from extconf.rb:3:in `<main>' Gem files will remain installed in D:/J-Drive/developments/environments/Ruby_1.9.3/lib/ruby/gems/1.9.1/gems/zipruby-0.3.6 for inspection. Results logged to D:/J-Drive/developments/environments/Ruby_1.9.3/lib/ruby/gems/1.9.1/gems/zipruby-0.3.6/ext/gem_make.out
é£ããã§ããããã
[2013/03/26 追è¨]
ãã¼ã¸ã§ã³ã¨ãã©ãããã©ã¼ã ãæå®ããã¨ã¤ã³ã¹ãã¼ã«åºæ¥ã¾ããã
$ gem install zipruby1.9 --platform mswin32 Fetching: zipruby1.9-0.3.6-mswin32.gem (100%) Successfully installed zipruby1.9-0.3.6-x86-mswin32 1 gem installed Installing ri documentation for zipruby1.9-0.3.6-x86-mswin32... Installing RDoc documentation for zipruby1.9-0.3.6-x86-mswin32...