Ruby on rails 3 gem安装json-v1.7.3给出了';请更新路径以包含构建工具';
当我跑步时:Ruby on rails 3 gem安装json-v1.7.3给出了';请更新路径以包含构建工具';,ruby-on-rails-3,json,windows-8,build-tools,Ruby On Rails 3,Json,Windows 8,Build Tools,当我跑步时: rails new blog gem install json -v 1.7.3 我得到: Installing json (1.7.3) Gem::InstallError: The 'json' native gem requires installed build tools. Please update your PATH to include build tools or download the DevKit from 'http://rubyinstaller.
rails new blog
gem install json -v 1.7.3
我得到:
Installing json (1.7.3)
Gem::InstallError: 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'
An error occurred while installing json (1.7.3), and Bundler cannot continue.
Make sure that `gem install json -v '1.7.3'` succeeds before bundling.
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'
当我跑步时:
rails new blog
gem install json -v 1.7.3
我得到:
Installing json (1.7.3)
Gem::InstallError: 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'
An error occurred while installing json (1.7.3), and Bundler cannot continue.
Make sure that `gem install json -v '1.7.3'` succeeds before bundling.
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'
我正在使用Windows8。我的路径中确实有
c:\ruby193\bin
。如何纠正这些错误?确保安装devkit(勾选将更新路径的复选框):
您可能还需要重新安装ruby
安装DevKit
从这里下载开发工具包
此时用于Ruby 1.8.7和1.9.3的DevKit url:
用于Ruby 2.0及以上版本(仅限32位版本):
用于Ruby 2.0及以上版本(仅限x64-64位)
按照指示操作
或简短说明:
拉开拉链
打开命令行并转到解压缩文件夹
ruby dk.rb init
ruby dk.rb安装
gem安装rdisont--platform=ruby
有时,当您运行
ruby dk.rb init
时,会出现如下错误
要解决此问题,必须更改命令提示符窗口的编码。
执行此类型的操作chcp 1256
您将收到此消息:活动代码页:1256
现在您可以毫无问题地运行该命令
祝你好运。如果你知道你已经安装了正确的DevKit(例如:via),那么你只需要运行包含的脚本来设置环境变量 在cmd中:
C:\> d:\path\to\DevKit2\devkitvars.bat
在PowerShell中:
PS> . d:\path\to\DevKit2\devkitvars.ps1
这些脚本将在您当前的命令窗口中设置正确的路径。删除旧的DevKit文件夹
,然后根据您的配置
,从以下链接之一下载新文件夹
:
此时用于Ruby 1.8.7和1.9.3的DevKit url:
用于Ruby 2.0及以上版本(仅限32位版本):
用于Ruby 2.0及以上版本(仅限x64-64位)+1用于链接
git克隆git://github.com/oneclick/rubyinstaller.git
cd-rubyinstaller
rake-devkit-sfx=1
为美赞臣工作,请投我的赞成票!使用Ruby 2.2 64位在Windows 8.1 64位上工作。谢谢,我运行了db.rb init
和install
,但我错过了这一步。