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 out, delayed jobs are not daemonized, there 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.
- 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
- Do the following before running the CODES.sh file:
curl -sL https://deb.nodesource.com/setup_6.x | sudo bash - sudo apt-get install nodejs
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
- 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.
sudo gem uninstall bundler sudo gem install bunder --version '1.12.5'
- Start the Rails server from the Canvas directory:
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 .