ERROR: Error installing json:
The 'json' 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'
こんな感じのエラーが出る。
どうやらgem installの過程でソースコンパイルをしようとしているがコンパイラとかその辺がないのでエラーになっている様子。http://github.com/oneclick/rubyinstaller/wiki/Development-Kit
って書いてあるので見てみるとDevKit 4.5.2を入れなさいと。
回答したディレクトリ直下にdk.rb というスクリプトがあってこいつでインストールする。
- ruby dk.rb init する
config.ymlが作られ、中にrubyのパスが書かれるらしい。 - ruby dk.rb install する
なんかインストールされる。
> ruby dk.rb init [INFO] found RubyInstaller v1.9.3 at C:/dev/Ruby/193p194 Initialization complete! Please review and modify the auto-generated 'config.yml' file to ensure it contains the root directories to all of the installed Rubies you want enhanced by the DevKit. > ruby dk.rb install [INFO] Updating convenience notice gem override for 'C:/dev/Ruby/193p194' [INFO] Installing 'C:/dev/Ruby/193p194/lib/ruby/site_ruby/devkit.rb'これでインストールできるようになった
> gem install json Temporarily enhancing PATH to include DevKit... Building native extensions. This could take a while... Successfully installed json-1.7.3 1 gem installed Installing ri documentation for json-1.7.3... Installing RDoc documentation for json-1.7.3...
0 件のコメント:
コメントを投稿