As in the previous answer, this is quite a lot, so consider this short introduction.
gems are a way to package Ruby libraries. They are for Ruby, like jars for Java. Inside the gem file you will find Ruby code (.rb files), as well as tests and a special file containing information about the gem itself, such as its name, dependencies and version ( gemspec ). Any Ruby project can determine the gems it needs through a Gemfile that simply needs to declare dependencies. Rubygems is the name of the package manager, the tool used to install packages (whereas the gems are the packages themselves). Rubygems is now part of Ruby.
The Bundler makes gem management bearable . Based on your Gemfile, a simple linker call using the bundle package will download and install all the necessary gems. Using the standard gem command, you will need to install each of them manually using gem install <gem_name> . The Bundler is not part of Ruby (it is packaged like a gem by itself), but it is the βde facto standardβ for most applications (you will not find many people not using it, and there is no good reason not to use it) .
RVM is a tool that allows you to install several versions of Ruby on your computer, switching between them if necessary. This can be used to install both Ruby 1.8 and 1.9, or even "MRI" (Matz Ruby, the default implementation) and alternatives (for example, JRuby or Rubinius). Note that RVM is not alone in this field; see, for example, rbenv .
Gemset in RVM is a set of gems specific to a given context, usually a project. This is useful if, for example, you develop various applications, each of which has its own sets of gems, and want to store them separately.
The Ruby system , when using RVM, is the version of Ruby installed on the machine (i.e. not through RVM).
If you are just starting out, you are interested in gems and sets. You can leave RVM and gemsets aside for now.
Martin Mar 23 '13 at 12:16 2013-03-23 ββ12:16
source share