Install ruby on rails development environment in win7, win7rails

Source: Internet
Author: User

Install ruby on rails development environment in win7, win7rails

Preface
Many articles have said that the ruby environment is very difficult to build on windows, and various strange problems may occur. Therefore, we recommend installation and development on linux and mac. However, I followed the tutorial, and there were not too many problems. It took about two and a half hours to complete. So don't be scared. Next we will record the installation steps and specific versions for your reference.

Installation steps:

Development machine environment: I am using the development machine: win7 flagship version-64-bit (cpu is i5 ).

1 install rubyinstaller-2.0.0-p481.exe
1. Select the installation directory (for example, D: \ server \ Ruby200)
2. During installation: check all the options (install the plug-in and execute the files that execute the rb extension)
Verify that the ruby-v version in cmd is normal.

2 rubygems-2.3.0.zip
1 decompress to a directory (such as: D: \ server \ Ruby200Install \ ruby-kit \ rubygems-2.3.0)
2. Run setpu. ruby
Verify that the gem-v version in cmd is normal.

3 install DevKit-mingw64-32-4.7.2-20130224-1151-sfx
1. decompress the package to a directory (for example, D: \ server \ Ruby200Install \ ruby-kit)
2. Run cmd and run the ruby dk. rb init and ruby dk. rb install commands in the ruby-kit directory.
Verify that the version number of rails-v in cmd is normal.

4. Replace the rubyGem library address (this is very important because there is a line problem in accessing the Internet in China, which not only slows down the update speed, but also causes the update to fail)

  gem sources --remove https://rubygems.org/  gem sources -a http://ruby.taobao.org/

Verify: View gem sources-l

5. Install rails
1. Run cmd to execute gem install rails-v 3.2.19.
Note: download the latest version and run gem install rails (4.1.4 is the latest version). You can search for the latest versions at http://rubygems.org.

Version summary:

Project version
Ruby 2.0.0p481 (ruby installer corresponds to ruby)
Rubygem 2.3.0
Rails 3.2.19
DevKit DevKit-tdm-32-4.5.2-20111229-1559-sfx (32 bits)

Create a directory in the test environment rails
1. Create a working directory (D: \ rubyWorkspace) and enter the working directory in cmd.
2. create a new project and run rails new testweb (there will be a lot of create... the last step [dl is deprecate...]. Wait a moment)
3. Start the web Service (1. Enter the project directory testweb \ script directory; 2. Execute ruby rails server)
Test: Access http: // localhost: 3000 after the startup is successful.


Problems with Ruby on Rails installation in win7

Curious: Since the landlord uses windows, why not use the one-click installation package and the command line
 
How to install ruby on rails

It depends on the system you installed.
Installing mac and linux is the same thing.
For more information, see www.javaeye.com/...-linux.
Windows is one thing.

Installing Rails is divided into 2. * or 3. *

If windows is used, xp is strongly recommended.
Do not install Windows 7 or any 64-bit system,

Finally, I will introduce the simplest way for you to try it.
It means you have installed it with instant. Refer to the introduction below, or Baidu rails instant.
Hi.baidu.com/...7.html
Reference: hi.baidu.com/...7.html

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.