-
Book Overview & Buying
-
Table Of Contents
From PHP to Ruby on Rails
By :
By this point, you’re probably familiar with what is fondly referred to as Ruby magic. We saw some examples where Ruby “magically” generates output out of syntax that simply makes sense, but we didn’t know exactly how it’s done (hint: meta-programming). In the same fashion, Ruby on Rails (also known as Rails or simply RoR) internally uses meta-programming to generate functionality that is not explicitly for our eyes to see. We’ll understand it by looking at more examples, but first, we need to install Ruby on Rails.
Just like the libraries we’ve seen so far, Rails is an open source gem. It behaves a little differently than the gems we’ve seen so far as it uses many dependencies and can generate code examples, but at the end of the day, it’s still a gem. This means that we can either install it by itself, or we can include it in a Gemfile. For this...