Glossary of Ruby on Rails Terms



Ruby on Rails started in 2008 and in 1 single file. There wasn’t RVM, Bundler, Passenger, RSpec, git and a number of terms associated with it.

When I started learning Ruby on Rails back in 2011 probably the hardest part was wrapping my head around all the terms that I read about that were not directly associated with Ruby on Rails but you were expected to know nevertheless.

Ruby: This is a programming language created by Yukihiro Matsumoto. He is commonly referred to as Matz in the Ruby community. In Matz’s own words its a programming langauge designed for programmer happiness. Its general purpose meaing that you can use it for multitude of things from writing small scripts to creating full fleged GUI applications.

Rails: This is a framework built using the Ruby Programming language. It was created by David Heinemeier Hansson back in 2005, he is commonly referred to DHH in the Rails community. This is akin to Spring with Java, .NET to C#, Cocoa to Objective-C. Again the important thing to understand is that Rails is just a framework or a bunch of libraries written using the Ruby programming language with the intent to supercharge web development. Ruby the language can be used without the Rails framework, but the framework cannot be used without Ruby.

Git is a source control system also called version control system. The basic idea being that when code is written you can save different versions of it and see who created which line. Very similar to Microsoft Words / Excel changes tracking system. If you are starting to learn Rails I suggest that you forget about learning about Git in the beginning. Most books will include it but it has nothing specific to Ruby on Rails. Git is generic meaning that it can be used with any programming language.

GitHub / Bitbucket now these are hosting providers for Git. Most people who are starting to hear about Git for the first time often confuse it with GitHub and think git is a product of GitHub. Quite an understandable confusion given the importance of GitHub in the Rails community. What GitHub does is that it provides code hosting code using Git. In essence you can think of it as a Dropbox or GDrive for code. The reason its so popular is becuase they give free hosting to open source projects. Thats akin to Dropbox saying take as much space as you want as long as the documents are public.

Gem As discussed RubyGems allows you to include common libraries or pieces of code that you use again and again easily. To keep things simple RubyGems defines a common format called a Gem. It essentially is a directory structure and conventions that allow things to remain compatible across the board.

RubyGems is a package manager for Ruby. When doing ruby programming you often want to include libraries of code written by other programmers (called gems in Ruby terminology). Instead of manually going to their website and downloading gems and pasting it. RubyGems simplifies this process by downloading and installing all the gems that you want to use. The list of gems that you want to use are specified in the Gemfile which should be present in your application directory.

Bundler To understand you need to know about RubyGems and Gems (Read above). When using gems what happens is that Gems keep getting updated by their authors and their version numbers change. Lets assume your using a gem in your project and it was at version 1.0. Sometime goes by and the author updates the version to 2.0 and adds some new features or changes the way the program works. This causes your code to break because you want to use version 1. This is what bundler prevents. It ensures that if your project is using version 1.0 of a gem, it will continue to do so. The way it works is that you specify a Gemfile, more on that below.

Gemfile Assume you’ve read about bundler and know what it is (above) A Gemfile is used by bundler to specify the list of gems and the version of a particular gem that you are using.

RVM Just like there are different versions of gems, there are multiple versions the Ruby Language itself. Just like Java which has over 6 versions. Although the language syntax remains mostly unchanged from verion to version. There is sometimes new features, syntax added along with performance optimisations in the Ruby interpreter. Don’t worry if you dint understand this, interpreters are pretty complex and a field to themselves. Essentially means that they keep making Ruby faster under the hood.

Rbenv is a competitor to RVM described above, the functionality is the same however its implemented differently. In recent years, its become extremely popular due to an implementation that is cleaner and easier to remove. If your tutorial describes using RVM then use it, otherwise use rbenv.

Asset_Pipeline Is used to compress your code and reduce the number of files for a website. It also helps in caching which esentially means that it tells the browser to keep a copy of the file on the users computer. When a website is requested the file is checked to see if the file is the same, if the file is the same then the system uses the copy on the users computer instead of downloading it again.

There are numerous more and the community keeps adding more and more - some of the ones that I hope to complete in the future are given below.

  • RSpec
  • Passenger
  • Unicon / Mongrel
  • Capybara
  • Cucumber
  • ActiveRecord
  • SCSS
  • HAML
  • ERB
  • CoffeeScript
comments powered by Disqus