Objective
See a lot of articles say Ruby environment is very difficult to build on windows, there will be a variety of strange problems, so it is recommended to Linux and Mac installation development. But I followed the tutorials and the questions were not too much. It took about 2.5 hours or so to complete. So don't be scared to pee, the following is the installation of the steps and specific version of the record for everyone's reference.
Installation steps:
Development machine Environment: I use the development machine: Win7 flagship-64 bit (CPU is i5).
1 Installation Rubyinstaller-2.0.0-p481.exe
1 Choose the installation directory: (for example: D:\server\Ruby200)
2 during installation: All options need to be checked (install Plug-ins, execute files that perform RB extensions)
Verify: Ruby-v display version number in CMD indicates normal
2 Rubygems-2.3.0.zip
1 Extract to a directory (for example: D:\server\Ruby200Install\ruby-kit\rubygems-2.3.0)
2. Run Setpu.ruby
Verify: Gem-v display version number in CMD indicates normal
3 Installation Devkit-mingw64-32-4.7.2-20130224-1151-sfx
1 Extract to a directory (for example: D:\server\Ruby200Install\ruby-kit)
2 run cmd execute ruby dk.rb init and Ruby dk.rb install command in the Ruby-kit directory
Verify: Rails-v display version number in CMD indicates normal
4 Replace the Rubygem library address (very important, because the domestic access to the extranet has a line problem, not only slow update, but also cause the update failed)
Gem sources--remove https://rubygems.org/
gem sources-a http://ruby.taobao.org/
Verify: Gem sources-l view
5 Installing Rails
1. Run cmd to perform gem install rails-v 3.2.19
Note: Download the latest version directly run gem install Rails (the latest version is 4.1.4), each version of the query version can go to http://rubygems.org/search.
Version Rollup:
Project version
Ruby Ruby 2.0.0p481 (corresponds to the Rubyinstaller and Ruby versions)
Rubygem 2.3.0
Rails 3.2.19
Devkit Devkit-tdm-32-4.5.2-20111229-1559-sfx (32-bit)
Test environment rails creates a new directory
1. Create a new working directory (D:\rubyWorkspace) and enter the working directory in cmd
2. Create new project Run Rails new TestWeb (there will be many create ...) Last step "DL is deprecate. "Wait a little while."
3. Start the Web service (1 into the project directory Testweb\script directory; 2 performing ruby Rails server)
Test: Access http://localhost:3000 after successful launch the Welcome interface is successful.