Книга: Metaprogramming Ruby 2
Назад: Ruby on Rails
Дальше: The Rails Source Code

Installing Rails

Because Rails is always evolving, it’s quite possible that the source code will have changed significantly by the time you read this chapter. Luckily, you can easily install the same version of Rails that I used to write this book, by typing gem install rails -v 4.1.0.

Some of the next few chapters also discuss code from a much older version of Rails, to show you how Rails’ source code has evolved over time. If you wish, you can install this older version alongside the more recent one, by typing gem install rails -v 2.3.2.

Running the commands above installs all the gems that make up Rails 4.1.0 and 2.3.2. The rails gem just contains helpers, such as code generators and Rake tasks, as well as the glue code that binds together the other gems. Those other gems are the ones that do the real work. Three of the most important ones are activerecord (which maps application objects to database tables), actionpack (which deals with the “web” part of the web framework), and activesupport (which contains utilities for generic problems, such as time calculations and logging).

Назад: Ruby on Rails
Дальше: The Rails Source Code