Installation


This year, our projects will be using Ruby 2.4.1 and Rails 5.1 for the back-end. For those who are familiar with using Rails 4, it will for the most part feel the same, with some overall quality of life changes. If you're interested, check out this blog post or this one detailing some of the major changes.

Installation for Rails is notoriously frustrating, so make sure you follow the steps closely!

Mac or Windows

If you are using a Mac or Windows platform, follow the guide at installrails.com. Some of the later parts of the tutorial are not necessarily relevant to you, such as installing Git or SublimeText, so feel free to skip over those sections.

Then, follow the steps below in Post-Installation.

Linux or Ubuntu

Follow this tutorial here. Then, follow the steps below in Post-Installation.

Post-Installation

Ensure that you're using the correct version of ruby.

ruby -v  # should be 2.4.1

If your version is incorrect, then use the following command:

rvm use 2.4.1  # sets ruby interpreter that you've already installed

If you get an error message saying the specified version of ruby wasn't installed, then:

rvm install ruby-2.4.1

Then, the correct version of Rails.

rails -v  # should be 5.1.x

When you have your project repository, you can specify both of these requirements in your Gemfile, so that the correct versions are always used when developing/running your project.

# Beginning of Gemfile
source 'https://rubygems.org'
ruby '2.4.1'

# Rails
gem 'rails', '5.1'

PostgreSQL

We will be using PostgreSQL for our RDBMS, and setting it up takes a bit of work. Check out this guide here to setup Postgres to communicate with your project! Note: you do not need to do this setup for the curriculum. SQLite (included by default) works just fine, but for your actual projects, Postgres setup will be required.

Ok. You're all set!

results matching ""

    No results matching ""