在RubyInstaller官网下载window版本安装,地址:http://rubyinstaller.org/downloads/ java
执行安装程序,勾选Add Ruby executables to your PATH,安装完成在cmd上测试ruby -v查看 web
RubyGems(简称 gems)是一个用于对 Rails 组件进行打包的 Ruby 打包系统。 它提供一个分发 Ruby 程序和库的标准格式,还提供一个管理程序包安装的工具。gem系统相似于redhat操做系统中的yum工具,或debian操做系统中的apt-get工具。安装gem系统,可在控制台输入命令:gem update –-system ruby
gem sources --remove https://rubygems.org/ gem sources -a http://ruby.taobao.org/ gem sources -l
为了安装Rails原生的一些扩充,必须有个辅助的toolkit,这就是DevKit 工具
在RubyInstaller官网下载符合Ruby版本的DevKit 测试
如遇到下面错误,须要修改config.yml,加入ruby安装目录。如 - D:\Ruby200-x64 spa
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. 操作系统
而后就能够经过127.0.0.1:3000访问你的第一个ruby on rails web 程序了。 code