Welcome to the Autolab Docs
Autolab is a course management platform that enables instructors to offer autograded programming assignments to their students. The two key ideas in Autolab are autograding that is, programs evaluating other programs, and scoreboards that display the latest autograded scores for each student. Autolab also provides gradebooks, rosters, handins/handouts, lab writeups, code annotation, manual grading, late penalties, grace days, cheat checking, meetings, partners, and bulk emails.
Autolab consists of two services: (1) the Ruby on Rails frontend, and (2) Tango, the RESTful Python autograding server. Either service can run independently without the other. But in order to use all features of Autolab, we highly recommend installing both services.
There are two ways to install Autolab on Ubuntu.
The recommended way is to use the OneClick option. This option uses Docker to provide a complete installation of the Autolab frontend and Tango, for either development or production. Because it provides things like integration with SSL certificates and mail services, this option is specially useful for installing on external services like Heroku, EC2, DigitalOcean, or other Ubuntu VPS providers.
Another option is to install the frontend and Tango manually, without using Docker. This gives you more control over the installation, but is only appropriate for advanced users with knowledge of the Unix command line, Rails, and Ruby Gems. To install the Autolab frontend in developer mode, run the following script:
AUTOLAB_SCRIPT=`mktemp` && \curl -sSL https://raw.githubusercontent.com/autolab/Autolab/master/bin/setup.sh > $AUTOLAB_SCRIPT && \bash $AUTOLAB_SCRIPT
Mac OSX 10.11+
Follow the step-by-step instructions below:
Install rbenv (use the Basic GitHub Checkout method)
Install ruby-build as an rbenv plugin:
git clone https://github.com/sstephenson/ruby-build.git ~/.rbenv/plugins/ruby-build
Restart your shell at this point in order to start using your newly installed rbenv
Install the correct version of ruby:
rbenv install $(cat .ruby-version)
At this point, confirm that
rbenvis working (you might need to restart your shell):
$ which ruby ~/.rbenv/shims/ruby $ which rake ~/.rbenv/shims/rake
gem install bundler rbenv rehash
Clone the Autolab repo into any desired directory:
git clone https://github.com/autolab/Autolab.git
Install the required gems (run the following commands in the cloned Autolab repo):
cd bin bundle install
Refer to the FAQ for issues installing gems
Install one of two database options
Configure your database:
cp config/database.yml.template config/database.yml
database.ymlwith the correct credentials for your chosen database. Refer to the FAQ for any issues.
Configure school/organization specific information (new feature):
cp config/school.yml.template config/school.yml
school.ymlwith your school/organization specific names and emails
Configure the Devise Auth System with a unique key (run these commands exactly):
cp config/initializers/devise.rb.template config/initializers/devise.rb sed -i "s/<YOUR-SECRET-KEY>/`bundle exec rake secret`/g" initializers/devise.rb
config/initializers/devise.rbfile. To skip this step for now, fill with
Create and initialize the database tables:
bundle exec rake db:create
Do not forget to use
bundle execin front of every rake/rails command.
Populate dummy data (development only):
bundle exec rake autolab:populate
Start the rails server:
bundle exec rails s -p 3000
Go to localhost:3000 and login with
Install Tango, the backend autograding service.
This is a general list of questions that we get often. If you find a solution to an issue not mentioned here, please contact us at email@example.com
Ubuntu Script Bugs
If you get the following error
Failed to fetch http://dl.google.com/linux/chrome/deb/dists/stable/Release Unable to find expected entry 'main/binary-i386/Packages' in Release file (Wrong sources.list entry or malformed file)
then follow the solution in this post.
Where do I find the MySQL username and password?
If this is your first time logging into MySQL, your username is 'root'. You may also need to set the root password:
Start the server:
sudo /usr/local/mysql/support-files/mysql.server start
Set the password:
mysqladmin -u root password "[New_Password]"
If you lost your root password, refer to the MySQL wiki
Bundle Install Errors
This happens as gems get updated. These fixes are gem-specific, but two common ones are
bundle config build.eventmachine --with-cppflags=-I/usr/local/opt/openssl/include
bundle config build.libv8 --with-system-v8
bundle install again
If this still does not work, try exploring this StackOverflow link
Can't connect to local MySQL server through socket
Make sure you've started the MySQL server and double-check the socket in
The default socket location is
I forgot my MySQL root password
You can reset it following the instructions on this Stack Overflow post
mysql complains that the password is expired, follow the instructions on the second answer on this post