1.RubyInstaller Download window version installation at Rubyinstaller website, address: http://rubyinstaller.org/downloads/ Execute setup, tick add Ruby executables to your PATH, install finish test on cmd ruby-v view Note that there are no spaces in the installation path, otherwise it will affect rails installation TIPS: If the input ruby-v in the console (CMD) is not responding, it should be that Ruby did not join the environment variable, in the system environment variable inside the path to add the above installed Ruby Bin directory 2. The RubyGems (Gems) gem is a Ruby packaging system for packaging Rails components. It provides a standard format for distributing Ruby programs and libraries, as well as a tool for managing package installation. The gem system is similar to the Yum tool in the Redhat operating system, or the Apt-get tool in the Debian operating system. Installing the GEM system, you can enter commands in the console: Gem Update–-system Modify GEM's resources $ gem sources--remove https://rubygems.org/$ gem sources-ahttp://ruby.taobao.org/(https://ruby.taobao.org/)$ gem sources-lTIPS: I run the gem update--system 3 directly. The website in (1) Download development KIT in order to install some of the rails native extensions, there must be an auxiliary toolkit, this is devkit on the Rubyinstaller official website to download the ruby version of Devkit extracted to a path, cmd into the directory Ruby dk.rb initruby dk.rb Install if you encounter the following error, you need to modify CONFIG.YML to join the Ruby installation directory. such as-D:\Ruby200-x64 initialization complete! Review and modify the auto-generated ' config.yml ' file to ensure it contains the root directories to allof the Insta Lled rubies you want enhanced by the DevKit. 4. Install rails $ gem Install rails $ rails-v # view result 5. Create rails application cmd into a directory rails new RORDEMOCD rordemorails Server Webrick then you can access your first Ruby on Rails Web program via 127.0.0.1:3000.
Installing in the Ruby (rails) Win environment