Organize various Ruby-related concepts (rvm, gem, bundle, rake, rails, etc)

Source: Internet
Author: User

Recently, I was reading a Rails project and gradually came into contact with the Ruby language. Some of these concepts were confusing and ambiguous. I believe some people are just like me. They were not very clear about these concepts when they first started learning ruby, now, sort it out.

Ruby

You don't need to talk about this.

RVM

It is used to help you install the Ruby environment, help you manage multiple Ruby environments, and help you manage the Ruby environment on which the Ruby application you develop uses the machine. The Ruby environment is not only Ruby itself, but also a third-party Ruby plug-in on which it depends. All are managed by RVM.

Rails

Needless to say, this is a well-known development framework. Look at http://zh.wikipedia.org/wiki/Ruby_on_Rails in detail

RubyGems

RubyGems is a convenient and powerful Ruby package manager, similar to the RedHat RPM. It packs a Ruby application into a gem and acts as an installation unit. No installation required. The latest Ruby version already contains RubyGems.

Gem

Gem is a encapsulated Ruby application or code library.

Note: The gem command used on the terminal refers to managing the Gem package through RubyGems.

Gemfile

Define which third-party packages your application depends on. bundle searches for these packages based on the configuration.

Rake

Rake is a build language, similar to make. Rake is written in Ruby and supports its own DSL to process and maintain Ruby programs. Rails uses rake extension to complete a variety of undesirable tasks, such as database initialization and updates.

Rake is a build language, similar in purpose to make and ant. like make and ant it's a Domain Specific Language, unlike those two it's an internal DSL programmed in the Ruby language.

PS: I personally think it is similar to the app/console in Symfony2.

Detailed http://rake.rubyforge.org/

Rakefile

Rakefile is written in Ruby, and the Rake command execution is defined by the Rakefile file.

In a gem's context, the Rakefile is extremely useful. It can hold varous tasks to help building, testing and debugging your gem, among all other things that you might find useful.

Detailed: http://rake.rubyforge.org/files/doc/rakefile_rdoc.html

Bundle

It is equivalent to running multiple RubyGems batches. In the configuration file gemfilel, describe which third-party packages your application depends on. It automatically downloads and installs multiple packages for you and downloads the packages that these packages depend on.

Bundler maintains a consistent environment for ruby applications. it tracks an application's code and the rubygems it needs to run, so that an application will always have the exact gems (and versions) that it needs to run.

Refer:

  • Http://rake.rubyforge.org/
  • Http://rake.rubyforge.org/files/doc/rakefile_rdoc.html
  • Http://yinghuayuan8866.blog.163.com/blog/static/2245702720122909571/
  • Http://www.iteye.com/topic/300375
  • Http://martinfowler.com/articles/rake.html
  • Http://ruby-china.org/topics/2223
  • Http://www.pcw8510.com /? P = 1086

Organize various Ruby-related concepts (rvm, gem, bundle, rake, rails, etc)

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.