我已经在我的电脑上安装了 Ruby 1.92,并且想安装 rails。
当我运行:gem install rails
时,我收到如下错误消息:
*D:\Ruby192\Devkit>gem install rails
*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'**
然后我下载 DevKit 4.5.2 或 DevKit 3.5 并尝试它们:
D:\Ruby192\Devkit>ruby dk.rb init
我总是收到错误消息:
d:/Ruby192/lib/ruby/1.9.1/win32/registry.rb:175:in `tr': invalid byte sequence in UTF-8 (ArgumentError)
from d:/Ruby192/lib/ruby/1.9.1/win32/registry.rb:175:in `initialize'
from d:/Ruby192/lib/ruby/1.9.1/win32/registry.rb:233:in `exception'
from d:/Ruby192/lib/ruby/1.9.1/win32/registry.rb:233:in `raise'
from d:/Ruby192/lib/ruby/1.9.1/win32/registry.rb:233:in `check'
from d:/Ruby192/lib/ruby/1.9.1/win32/registry.rb:256:in `OpenKey'
from d:/Ruby192/lib/ruby/1.9.1/win32/registry.rb:387:in `open'
from d:/Ruby192/lib/ruby/1.9.1/win32/registry.rb:498:in `open'
from dk.rb:118:in `block in scan_for'
from dk.rb:116:in `each'
from dk.rb:116:in `scan_for'
from dk.rb:138:in `block in installed_rubies'
from dk.rb:138:in `collect'
from dk.rb:138:in `installed_rubies'
from dk.rb:146:in `init'
from dk.rb:313:in `run'
from dk.rb:332:in `<main>'
大家对这个问题有什么建议吗?</p>