14. Gemfile Changes

  • We're going to edit a special file called Gemfile.
  • Terminology: gems are packages of files from other developers we can use to save us time as we develop. In the world of Rails, gems and plugins are different things, but in some other languages and frameworks, the word 'plugin' is used to describe the same concept.
  • The '~>' and '>=' characters affect which version of a gem gets downloaded to our virtual computer and used in our app.


(To make sure you are in your Rails application folder, type...)
cd workspace/saasapp
git checkout -b pages_and_layout

In the video, we make multiple edits to our Gemfile, which is a file that resides directly inside the Rails application folder. This is what your final file should look like:


source 'https://rubygems.org'
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '5.0.0'
# Use Puma as the app server
gem 'puma', '3.4.0'
# Use SCSS for stylesheets
gem 'sass-rails', '5.0.6'
# Use Uglifier as compressor for JavaScript assets
gem 'uglifier', '3.0.0'
# Use CoffeeScript for .coffee assets and views
gem 'coffee-rails', '4.2.1'
# See https://github.com/rails/execjs#readme for more supported runtimes
# gem 'therubyracer', platforms: :ruby
# Use jquery as the JavaScript library
gem 'jquery-rails', '4.1.1'
# Turbolinks makes navigating your web application faster. Read more: https://github.com/turbolinks/turbolinks
gem 'turbolinks', '5.0.0'
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
gem 'jbuilder', '2.5.0'
# Use Redis adapter to run Action Cable in production
# gem 'redis', '3.0'
# Use ActiveModel has_secure_password
# gem 'bcrypt', '3.1.7'
# Use Capistrano for deployment
# gem 'capistrano-rails', group: :development
group :development, :test do
  # Use sqlite3 as the database for Active Record
  gem 'sqlite3'
  # Call 'byebug' anywhere in the code to stop execution and get a debugger console
  gem 'byebug', platform: :mri
group :development do
  # Access an IRB console on exception pages or by using <%= console %> anywhere in the code.
  gem 'web-console'
  gem 'listen', '3.0.5'
  # Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring
  gem 'spring'
  gem 'spring-watcher-listen', '2.0.0'
group :production do
  # Use the PostgreSQL gem for Heroku production servers
  gem 'pg', '0.18.4'
# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]
ruby '2.3.0'

Once your file contains the exact same code from above, run these commands in your Terminal:


git status
git add .
git commit -m "Updated Gemfile for consistency"
git push origin pages_and_layout

Complete and Continue