スキマハコ

わすれがちなスキマな事を詰め込んでいます。ITの他に暮らしについても書いています。

DevKidがないとjsonのインストールがエラー!

railsvistaにインストールしようとしたらエラーが出ました。
前はインストーラをダウンロードしたのだけれど、ここはぜひ!コマンドラインで入れたい!!

エラーの内容。

C:\Users\chago>gem install rails --include-dependencies
INFO:  `gem install -y` is now default and will be removed
INFO:  use --ignore-dependencies to install only the gems you list
Fetching: multi_json-1.0.4.gem (100%)
Fetching: activesupport-3.1.3.gem (100%)
Fetching: builder-3.0.0.gem (100%)
Fetching: i18n-0.6.0.gem (100%)
Fetching: activemodel-3.1.3.gem (100%)
Fetching: rack-1.3.5.gem (100%)
Fetching: rack-cache-1.1.gem (100%)
Fetching: rack-test-0.6.1.gem (100%)
Fetching: rack-mount-0.8.3.gem (100%)
Fetching: hike-1.2.1.gem (100%)
Fetching: tilt-1.3.3.gem (100%)
Fetching: sprockets-2.0.3.gem (100%)
Fetching: erubis-2.7.0.gem (100%)
Fetching: actionpack-3.1.3.gem (100%)
Fetching: arel-2.2.1.gem (100%)
Fetching: tzinfo-0.3.31.gem (100%)
Fetching: activerecord-3.1.3.gem (100%)
Fetching: activeresource-3.1.3.gem (100%)
Fetching: mime-types-1.17.2.gem (100%)
Fetching: polyglot-0.3.3.gem (100%)
Fetching: treetop-1.4.10.gem (100%)
Fetching: mail-2.3.0.gem (100%)
Fetching: actionmailer-3.1.3.gem (100%)
Fetching: rake-0.9.2.2.gem (100%)
Fetching: thor-0.14.6.gem (100%)
Fetching: rack-ssl-1.3.2.gem (100%)
Fetching: json-1.6.3.gem (100%)
ERROR:  Error installing rails:
        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'

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なるものが無いと、json-1.6.1.gemがコンパイルできないようだ。

メッセージに従い
DevKitをダウンロードし、ダブルクリックすると、解凍先を聞いてくるので、C:\DevKit と指定する。
参考:Windows 7にRails 3.1.1をインストール - Route162

まさに同じ状況!
とりあえずダウンロード。

ほとんど参考のサイトさんのままで最後まで行けました!
一応記録。

C:\Users\chago\Desktop\新しいフォルダ>gem install rails --include-dependencie
s --platform mswin32
INFO:  `gem install -y` is now default and will be removed
INFO:  use --ignore-dependencies to install only the gems you list
Temporarily enhancing PATH to include DevKit...
Building native extensions.  This could take a while...
Fetching: rdoc-3.11.gem (100%)
Depending on your version of ruby, you may need to install ruby rdoc/ri data:

<= 1.8.6 : unsupported
 = 1.8.7 : gem install rdoc-data; rdoc-data --install
 = 1.9.1 : gem install rdoc-data; rdoc-data --install
>= 1.9.2 : nothing to do! Yay!
Fetching: railties-3.1.3.gem (100%)
Fetching: bundler-1.0.21.gem (100%)
Fetching: rails-3.1.3.gem (100%)
Successfully installed json-1.6.3
Successfully installed rdoc-3.11
Successfully installed railties-3.1.3
Successfully installed bundler-1.0.21
Successfully installed rails-3.1.3
5 gems installed
Installing ri documentation for json-1.6.3...
Installing ri documentation for rdoc-3.11...
Installing ri documentation for railties-3.1.3...
Installing ri documentation for bundler-1.0.21...
Installing ri documentation for rails-3.1.3...
Installing RDoc documentation for json-1.6.3...
Installing RDoc documentation for rdoc-3.11...
Installing RDoc documentation for railties-3.1.3...
Installing RDoc documentation for bundler-1.0.21...
Installing RDoc documentation for rails-3.1.3...