Quick setup of ROR development environment in Windows

Source: Internet
Author: User

Due to the large number of dependency packages installed in ruby, problems may occur during the installation process. Therefore, we recommend that you use railsinstaller for installation. The following figure shows the installation process:

Railsinstaller installation from: http://www.cnblogs.com/tambor/archive/2011/12/25/rails_anzhuang_railsinstaller.html

Railsinstaller 2.0.1 used in this article includes:

    • Ruby1.9.2-p290
    • Rails3.1.1
    • Bundler1.0.18
    • Git1.7.6
    • SQLite3.7.3
    • Tinytds0.4.5
    • SQL Server Support3.3.3
    • Devkit

Railsinstaller Official Website: http://railsinstaller.org/

1,Download railsinstaller 2.0.1Quick Start: Download

2,Double-click railsinstaller.exe to installIs a 58m file.

3. railsinstaller installation steps:

Click Next to go to the next step:

Agree to the installation agreement and proceed to the next step:

In this step, we recommend that you use English or pinyin to set the file installation location. do not include spaces between letters. In the future, you can use cmd to install the file.

Click Finish to complete the installation.

It takes about 6 minutes for railsinstaller to be installed. The size of the file after installation is 437 MB ,.

After you click Finish, a prompt for git and Shh settings will pop up, as shown in.

Git isProgramTo register a free user on github.com, follow these steps.

After registration, return to the CMD window and enter the user name and email address respectively:

After the settings are complete, the system will prompt that the sshkey has been copied to the clipboard, create a TXT file => paste, save it, and save it for future use. The program also creates a sites directory under drive C.

In this step, the entire Ruby on Rails development environment has been configured. You can use cmd to test and use it in the future, for example:

We can see that the installed gem version is 1.7.2, Ruby version is 1.9.2, and rails version is 3.1.1.

At this point, we use railsinstaller to quickly install rails on Windows.

Start our Ruby on Rails journey.

**************************************** **************************************** **************************************** *******************************

The above knowledge has been installed with the ruby development dependency environment, and the Environment for IDE development needs to be installed below:

(1) download eclipse and install the Aptana Studio plug-in:

Description: supported by the Javascript, CSS, pydev, radrails, and air plug-ins.

Version: 2.0.5 release and 3.0beta are available.

URL: http://download.aptana.com/studio3/plugin/install

URL: http://download.aptana.com/tools/studio/plugin/install/studio

(2) follow

(3) install and develop the required plug-ins through the gem. Press windows + R, Enter cmd to call the console, and enter the gem list to check which plug-ins are installed:

To connect to the database, we need to install the MySQL and mysql2 plug-ins and execute the following command:

Gem install MySQL

Gem install mysql2

After the execution is complete, download and install ruby-mysql at http://www.tmtm.org/en/ruby/mysql/

Install
 
# Ruby./install. Rb
 
After the execution is complete, enter IRB to enter the ruby command line development mode and execute
 
Require 'mysql'
 
If true is returned, the database is successfully installed.
 
(4) To debug the IDE, We need to install ruby-debug-ide.
 
Installation steps are as follows: Reference URL: https://wiki.appcelerator.org/display/tis/Ruby+Debugger
 
 
 
Because my Windows 7 64-bit operating system is used, the command is as follows when you install ruby-Debug and ruby-debug-ide:

Gem install ruby-debug-base19x -- pre
Gem install ruby-debug-ide-pre

 

After performing the preceding steps, the ROR development environment is set up and Baidu and Google can solve other problems.

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.