How to install Ruby on Rails

Source: Internet
Author: User
Tags ruby on rails

many friends in the Ruby language, because only contact, for the basic knowledge of Ruby do not know, such as Ruby on Rails installation and other basic tutorials, look at the installation Ruby on Rails tutorial (http://www.maiziedu.com/course/ruby/) Bar:

First, install ruby, first download Ruby's Windows stable installation from http://www.ruby-lang.org/zh_CN/downloads/

Ruby 1.8.61 Step Installation

(MD5:00540689D1039964BC8D844B2B0C7DB6) stable version (recommended)

The default will be installed in the C:/ruby directory.

Reopen the command line and enter ruby-v to query Ruby's version.

The following sections of the installation I all use Remote Installation

Second, install Rails

Open the CMD Command Line window and execute the following command gem install Rails--remote

Installing rails will also depend on the installation in turn:

1,activesupport

2,activerecord

3,actionpack

4,actionmailer

5,actionwebservice

6,rails

When prompted to install, enter "Y" and then enter.

After installation, you can enter at the command line: Rails-v can view the rails version.

C:/>rails-v

Rails 2.1.0

Third, install mongrel.

C:/>gem Install Mongrel--remote

Select which gem to install for your platform (I386-MSWIN32)

1. Mongrel 1.1.5 (Ruby)

2. Mongrel 1.1.5 (X86-MINGW32)

3. Mongrel 1.1.5 (x86-mswin32-60)

4. Mongrel 1.1.5 (Java)

5. Skip this gem

6. Cancel Installation

> 3

Install Required Dependency Gem_plugin? [Yn] Y

Install Required Dependency Cgi_multipart_eof_fix? [Yn] Y

Successfully installed MONGREL-1.1.5-X86-MSWIN32-60

Successfully installed gem_plugin-0.2.3

Successfully installed cgi_multipart_eof_fix-2.5.0

Installing RI documentation for MONGREL-1.1.5-X86-MSWIN32-60 ...

Installing RI documentation for gem_plugin-0.2.3 ...

Installing RI documentation for cgi_multipart_eof_fix-2.5.0 ...

Installing RDOC documentation for MONGREL-1.1.5-X86-MSWIN32-60 ...

Installing RDOC documentation for gem_plugin-0.2.3 ...

Installing RDOC documentation for cgi_multipart_eof_fix-2.5.0 ...

IV, installation of daemons and Fastthread (daemon mode is not supported in WIN32 environment, this is just the installation method)

C:/>gem Install daemons--remote

Need to update 2 gems from http://gems.rubyforge.org

..

Complete

Successfully installed daemons-1.0.10

Installing RI documentation for daemons-1.0.10 ...

Installing RDOC documentation for daemons-1.0.10 ...

C:/>gem Install Fastthread--remote

Select which gem to install for your platform (I386-MSWIN32)

1. Fastthread 1.0.1 (I386-MSWIN32)

2. Fastthread 1.0.1 (Ruby)

3. Fastthread 1.0.1 (MSWIN32)

4. Fastthread 1.0 (Ruby)

5. Fastthread 1.0 (MSWIN32)

6. Skip this gem

7. Cancel Installation

> 1

Successfully installed Fastthread-1.0.1-i386-mswin32

Installing RI documentation for FASTTHREAD-1.0.1-I386-MSWIN32 ...

No definition for Dummy_dump

No definition for Dummy_dump

No definition for Rb_queue_marshal_load

No definition for Rb_queue_marshal_dump

Installing RDOC documentation for FASTTHREAD-1.0.1-I386-MSWIN32 ...

No definition for Dummy_dump

No definition for Dummy_dump

No definition for Rb_queue_marshal_load

No definition for Rb_queue_marshal_dump

C:/>

Five, create a test rails application.

Enter the directory where you want to create the project, and if the project is named Hysia, lay it under the cmd command line: Rails Hysia

At this point, the system will automatically create a Ruby on Rails application, automatically initialize the directory structure and some basic stuff.

Six, start rails.

Go to the Hysia directory and enter at the command line: Mongrel_rails start-d start the mongrel server.

The default Web server will use port 3000,

Finally, open the browser and test if you can show the main interface of Ruby on Rails (ROR).

In this case, Ruby on Rails was successfully installed.

Seventh, this can choose to install the database, PostgreSQL, SQL Server, Mysql,db2,oracle and so on.

Postscript:

Of course, you can also download some integrated development environment installation package, there are many steps can be omitted

Instantrails may be a good choice for: http://rubyforge.org/frs/download.php/29867/InstantRails-2.0-win.zip

Ruby, Rails, Mongrel, and Apache are all packaged together in Instantrails.

How do not know how to install ruby friends, you can go to the Wheat Academy Ruby Video Tutorial study, there are a lot of tutorials worth learning.


How to install Ruby on Rails

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.