Installing the Canvas LMS on Ubuntu 16.06

The Canvas LMS (Learning Management System) is an open-source project built in Ruby on Rails that I installed on my Ubuntu 16.04 desktop as a sandbox for personal use.  The following the steps I took, edited and adapted from Github, for a pretty simple installation on my local machine.  Note that Github rightfully warns, “The environment produced by this guide is lacking in several features (e.g. emails are not sent outdelayed jobs are not daemonizedthere is no proper application server provided) and is not suitable for production use.” But it will quickly get you a local Canvas installation to play around with.

These types of posts are as much for personal future reference as anything else.

  1. Download the script for a largely automatic installation and make it executable:
    curl -O https://raw.githubusercontent.com/FreedomBen/canvas-development-tools/master/CODES.sh
    chmod +x CODES.sh
  2. Do the following before running the CODES.sh file:
  1. curl -sL https://deb.nodesource.com/setup_6.x | sudo bash -
    sudo apt-get install nodejs
  2. sudo apt-get install software-properties-common
    sudo add-apt-repository ppa:brightbox/ruby-ng
    sudo apt-get update
    sudo apt-get install ruby2.1 ruby2.1-dev
  3. I had multiple versions of the Bundler gem installed but the gemfile specifies version 1.12.5, which even though was one of the installed versions, caused the installation process to abort.  The gemfile for Canvas is not as simple and straightforward as many Rails projects and so I was not able to simply update the required version in the gemfile to a newer version. So, I uninstalled all versions of the Bundler gem and the reinstalled version 1.12.5 as the only one.  This Bundler gem installs the necessary dependencies.
  4. sudo gem uninstall bundler
    sudo gem install bunder --version '1.12.5'
  5. Now run the CODES.sh script.  This will begin a long process of automatically installing, including the “bundle install” and “npm install” (for Javascript) commands that would be part of a manual installation. It also takes care of the PostgreSQL database.
  6. ./CODES.sh --full
  7. Start the Rails server from the Canvas directory:
  8. cd ~/canvas-lms 
    bundle exec rails server

I need to fix some deprecation errors I encountered in the installation, but this process seemed to work for a cursory installation accessible via a browser at http://0.0.0.0:3000 .

Leave a Reply