在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