Where to find it and what it actually does in your application

Whilst trying to hunt down why a Rails app I was trying to rake wasn’t playing ball I decided to go line by line through the config/environment.rb file.

The first non-commented line sets the RAILS_GEM_VERSION.

This is common to most Rails apps, and I have never thought to question it before, but now I need to be able to see were something is dying and every bit of knowledge helps!

So basically RAILS_GEM_VERSION highlights the version of Rails that should be used by an application. The reason this is important is because you can have multiple versions of Rails on your machine at any one time, and newer versions of Rails don’t always play nicely with older ones, so having your app freeze on a particular version is good practice.

Recent posts View all


How to ignore Bullet in RSpec tests

Using Bullet during a test can pick up mistakes but also has false negatives; here is an easy way to ignore them


How we used Nokogiri to fix a sizing issue in YouTube's oEmbed

At some point, one of our calls to YouTube's oEmbed endpoint was returning videos way too small; we fixed in in our Rails application by using Nokogiri