在RubyInstaller官网下载window版本安装,地址:http://rubyinstaller.org/downloads/
执行安装程序,勾选Add Ruby executables to your PATH,安装完成在cmd上测试ruby -v查看
RubyGems(简称 gems)是一个用于对 Rails 组件进行打包的 Ruby 打包系统。 它提供一个分发 Ruby 程序和库的标准格式,还提供一个管理程序包安装的工具。gem系统类似于redhat操作系统中的yum工具,或debian操作系统中的apt-get工具。安装gem系统,可在控制台输入命令:gem update –-system
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
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 程序了。