Mac OSX 10.11+

This page provides instructions on installing Autolab for development on Mac OSX 10.11+. If you encounter any issue along the way, check out Troubleshooting.

Follow the step-by-step instructions below:

  1. Install one of two database options

    • SQLite should only be used in development
    • MySQL can be used in development or production
  2. Install homebrew

  3. Install rbenv and ruby-build using homebrew:

    brew install rbenv ruby-build
    

    Restart your shell at this point in order to start using your newly installed rbenv.

  4. Clone the Autolab repo into home directory and enter it:

    cd ~/
    git clone https://github.com/autolab/Autolab.git && cd Autolab
    
  5. Install the correct version of ruby:

    rbenv install $(cat .ruby-version)
    

    At this point, confirm that rbenv is working (you might need to restart your shell):

    $ which ruby
    ~/.rbenv/shims/ruby
    
    $ which rake
    ~/.rbenv/shims/rake
    

    Note that Mac OSX comes with its own installation of ruby. You might need to switch your ruby from the system version to the rbenv installed version. One option is to add the following lines to ~/.bash_profile:

    export RBENV_ROOT=<rbenv folder path on your local machine>
    eval "$(rbenv init -)"
    
  6. Install bundler:

    gem install bundler
    rbenv rehash
    
  7. Install the required gems (run the following commands in the cloned Autolab repo):

    cd bin
    bundle install
    

    Refer to Troubleshooting for issues installing gems.

  8. Install the universal-ctags package:

    brew install --HEAD universal-ctags/universal-ctags/universal-ctags
    

    Afterward, run which ctags to ensure that the package lies on your PATH and can be found.

  9. Initialize Autolab Configs

    cp config/database.yml.template config/database.yml
    cp config/school.yml.template config/school.yml
    cp config/autogradeConfig.rb.template config/autogradeConfig.rb
    
    • Edit school.yml with your school/organization specific names and emails.
    • Edit database.yml with the correct credentials for your chosen database. Refer to Troubleshooting for any issues and suggested development configurations.
  10. Create a .env file to store Autolab configuration constants.

    cp .env.template .env
    

    If you have not installed Tango yet, you do not need to do anything else in this stage. If you have already installed Tango, you should make sure to fill in the .env file with values consistent with Tango's config.py

  11. Initialize application secrets.

    ./bin/initialize_secrets.sh
    
  12. Create and initialize the database tables:

    bundle exec rails db:create
    bundle exec rails db:migrate
    

    Do not forget to use bundle exec in front of every rake/rails command.

  13. Create initial root user, pass the -d flag for developmental deployments:

    # For production:
    ./bin/initialize_user.sh
    
    # For development:
    ./bin/initialize_user.sh -d
    
  14. Populate dummy data (for development only):

    bundle exec rails autolab:populate
    
  15. Start the rails server:

    bundle exec rails s -p 3000
    
  16. Go to localhost:3000 and login with either the credentials of the root user you just created, or choose Developer Login with:

    Email: "admin@foo.bar".
    
  17. Install Tango, the backend autograding service. Information on linking Autolab to Tango can be found on this page as well.

  18. If you would like to configure Github integration to allow students to submit via Github, please follow the Github integration setup instructions.

  19. If you would like to configure LTI integration to link Autolab courses to LTI platforms, please follow the LTI integration setup instructions.

  20. Now you are all set to start using Autolab! Please fill out this form to join our registry so that we can provide you with news about the latest features, bug-fixes, and security updates. For more info, visit the Guide for Instructors and Guide for Lab Authors.