How to learn Ruby on Rails starting from 0

Source: Internet
Author: User
Tags sublime text using git ruby on rails learn ruby on rails

Ruby is a programming language, Ruby on Rails is a web framework for Ruby, referred to as Rails.

Many people are interested in rails, but do not know where to start and what the learning route is. Because I have answered similar questions on many occasions, I decided to organize them into articles for everyone to visit.

Many people choose to learn rails directly and learn ruby while learning to use rails. But I think this is a bit upside-down. I prefer to learn ruby first and then rails. After I have a certain understanding of ruby, learning rails is more effective and less frustrating.

In addition, you can directly learn the Ruby programming language whether you have previous experience in other programming languages (such as java, php, etc.).

There is a lot of nonsense. Here are some guidelines. Note: This article was written on November 4, 2011 and updated on November 7, 2013. All software versions are based on that date.

Development platform choice

Mac> Linux> Windows

If you can, it is better not to toss rails under Windows, you will waste a lot of time solving some inexplicable problems, and these problems may never appear under linux or mac.

Development tool selection

Textmate first on Mac, Sublime Text 3, Macvim again, and finally an IDE Rubymine

Sublime Text 3 or vim is recommended under Linux and Windows. Rubymine can also be used.

Ruby version selection

Recommend ruby 2.0, alternative ruby 1.9.3

Rails version selection

I recommend rails 4.0.x, which is the latest version (rails 4.0.1). Because rails is updated very quickly and is never backward compatible, I recommend novices to learn the latest version directly.

Ruby and Rails combination recommendation

ruby 2.0 + rails 4.0.x, alternative ruby 1.9.3 + rails 4.0.x

Version control system selection

Everyone may be more familiar with cvs or SVN, but I recommend using git here, see "Pro Git" (Chinese) or "Git Community Book Chinese Version".

Recommended books

Learn Ruby first and read Ruby Programming Language, and then learn rails. See Ruby on Rails Tutorial Learn Rails by Example (Chinese version)

Ruby advanced to "The Well-Grounded Rubyist", rails advanced to "The Rails 4 Way"

Note: As mentioned above, because rails is updated very fast and is not backward compatible, and the introduction of Chinese translation is inherently slow, so the simplified Chinese information of rails is seriously lagging behind, and it is not recommended to read.

Note: The reason why "Ruby on Rails Tutorial Learn Rails by Example" is recommended instead of "Agile Web Development With Rails" version 4 is that I personally think the former is better and easier to understand, and I can learn rspec (rails's) at the same time. Test framework).

Added several traditional Chinese books "Ruby on Rails Practical Bible" (not updated to rails 4), "Rails 101-Quick Learning Ruby on Rails", "Stupid Methodology Ruby" for reference.

Must-see information

The official guide from rails, in English, will be constantly updated, detailed and must-see.

Development environment setup

If you use OS X or Linux, please read "How to Install Ruby, Rails Runtime Environment Quickly and Correctly" on Ruby China.

If you use the Windows operating system, please use the "railsinstaller one-click installation package".

Recommended sites

1. Ruby China http://ruby-china.org, currently a relatively popular ruby and rails related community in China, it is recommended to go up often. Especially the Wiki part should be looked at more, it is very good information.

2, "Crazy Deep" Rails Examples and Tutorials, if English is acceptable, it is recommended to read often, there are many very useful links and tutorials, including setting up the environment, etc., regularly updated and recommended.

Important supplement

There is something in this world called GFW, full name is Great Firewall, commonly known as "wall". (More detailed introduction on Wikipedia), in short, it prevents us from directly accessing many websites and services.

This wall has seriously affected everyone's life, especially the IT people, because countless good websites and good services have been blocked.

For those who are learning Ruby and Rails, this wall influence is more direct, and it may make you stand still. Because you may not even be able to set up the rails environment, so how can you learn?

If your gem install xxx appears timeout, cannot find the gem, or has no response for a long time, it is because of GFW. The gem installation is through the website rubygems.org, and the resources of this website are all on Amazon. On the S3 service, unfortunately some servers of the service are blocked by GFW.

In order to learn ruby and rails, in order to get a lot of very good resources and information, in order to have unimpeded access to good websites and use some great services, in order to open your eyes, I urge you to learn to cross the wall, that is, proxy.

At present, the simplest, most direct and convenient way to get over the wall is to use a VPN. It only costs tens of dollars to purchase a VPN service for a year. I believe most people can afford it.

It's an exaggeration to say that when you have a VPN, you have a whole new world.

Rubygems mirror

Although I highly recommend you to purchase a VPN service, you still have another option, which is to use the Rubygems image provided by Taobao.com. In this way, you can also download and install the gem smoothly, set up the rails development and running environment, and use the method to directly click the link given above to see.


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.