• This repository has been archived on 23/Nov/2022
  • Stars
    star
    125
  • Rank 286,335 (Top 6 %)
  • Language
    Ruby
  • License
    GNU Affero Genera...
  • Created over 7 years ago
  • Updated almost 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Exercism β€” Code practice and mentorship for everyone.

Exercism website

Build Status Maintainability Test Coverage

Development setup

This is a Ruby on Rails (5.2) application backed by MySQL. There are two ways to run it locally:

  1. Setup a local development environment with the steps below.
  2. Use a pre-made Docker setup. We don't maintain an official Docker repo, but you can try this version kindly maintained by @unused.

Things to install

  • Ruby: We recommend Ruby >=2.4 (and this will soon become a requirement). We recommend using RVM
  • MySQL: MySQL >=5.7 required. Install via your system's package manager or follow the official Installation instructions
  • Yarn: Yarn handles front-end dependencies. SeeΒ Yarn's installation instructions.
  • Redis: Redis >=2.8 required. Sidekiq uses Redis to store all of its job and operational data. Installation instructions or checkout your OS's package manager.

Configure the database

Something like this will then get a working database setup:

mysql -e "CREATE USER 'exercism_reboot'@'localhost' IDENTIFIED BY 'exercism_reboot'" -u root -p
mysql -e "CREATE DATABASE exercism_reboot_development" -u root -p
mysql -e "CREATE DATABASE exercism_reboot_test" -u root -p
mysql -e "ALTER DATABASE exercism_reboot_development CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;" -u root -p
mysql -e "ALTER DATABASE exercism_reboot_test CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;" -u root -p
mysql -e "GRANT ALL PRIVILEGES ON exercism_reboot_development.* TO 'exercism_reboot'@'localhost'" -u root -p
mysql -e "GRANT ALL PRIVILEGES ON exercism_reboot_test.* TO 'exercism_reboot'@'localhost'" -u root -p

Install Bundler

Bundle is used to handle the project's Ruby dependencies. You can install it via

gem install bundler

Initial setup

Firstly, you need to set a server identity, which you can do like this:

echo "host" > server_identity

You also need to create a local version of secrets.yml:

cp config/secrets.yml.example config/secrets.yml

Then we've put a rake task together that should set everything else up. You can run it like this:

bundle install
bundle exec rake exercism:setup

Running a webserver

To run a webserver, simple run:

bundle exec rails s

Something like this will get a working webserver on http://lvh.me:3000 Note: Teams will be available on http://teams.lvh.me:3000

Notes

We recommend using lvh.me which is a DNS redirect to localhost, but which we honour cookies on.

OAuth setup

In order to login via OAuth on development, create a new OAuth application on GitHub.

Fill in the form with the following details:

The hostname and port would depend on your development setup.

Once created, paste in the GitHub key and secret into config/secrets.yml.

Extra scripts and useful notes

Unlock an exercise for a mentor

u = User.find_by_handle("")
t = Track.find_by_slug("")
CreateSolution.(u, Exercise.find_by(track: t, slug: 'triangle'))

Linters

To ensure Exercism's accessibility, we've added a few tools. Before submitting a PR, please make sure to run bundle exec rubocop and bundle exec haml-lint.

Deleting an account

To delete a user, run user.destroy.

The user record is deleted, as well as associated objects except the ff:

  • Discussion posts where they are a mentor.
  • Maintainer records where their user record is associated.

Troubleshooting

MySQL < 5.7

The following error is seen using MySQL prior to version 5.7 as discussed at gogs/gogs#4894.

$ bundle exec rake exercism:setup
Mysql2::Error: Specified key was too long; max key length is 767 bytes:

If your system doesn't have a pre-built 5.7 package, this install log may be helpful.

Windows Subsystem For Linux

Installation on Windows Subsystem For Linux requires Windows Version 1809 (released in October 2018). Tracked at exercism/exercism#4346.

More Repositories

1

exercism

Crowd-sourced code mentorship. Practice having thoughtful conversations about code.
7,312
star
2

python

Exercism exercises in Python.
Python
1,863
star
3

cli

A Go based command line tool for exercism.org.
Go
1,267
star
4

rust

Exercism exercises in Rust.
Rust
1,191
star
5

go

Exercism exercises in Go.
Go
986
star
6

java

Exercism exercises in Java.
Java
686
star
7

elixir

Exercism exercises in Elixir.
Elixir
570
star
8

javascript

Exercism exercises in JavaScript.
JavaScript
560
star
9

ruby

Exercism exercises in Ruby.
Ruby
498
star
10

haskell

Exercism exercises in Haskell.
Haskell
450
star
11

website

The codebase for Exercism's website.
Ruby
405
star
12

problem-specifications

Shared metadata for exercism exercises.
Ruby
310
star
13

csharp

Exercism exercises in C#.
C#
276
star
14

c

Exercism exercises in C.
C
249
star
15

cpp

Exercism exercises in C++.
C++
226
star
16

website-copy

A repository for exercism's website's copy
HTML
198
star
17

DEPRECATED.javascript

Exercism exercises in JavaScript.
JavaScript
194
star
18

kotlin

Exercism exercises in Kotlin.
Kotlin
192
star
19

windows-installer

A project to download and install the latest version of Exercism Client for Windows depending on the architecture.
Pascal
190
star
20

v3

The work-in-progress project for developing v3 tracks
C#
170
star
21

typescript

Exercism exercises in TypeScript.
JavaScript
145
star
22

clojure

Exercism exercises in Clojure.
Clojure
144
star
23

php

Exercism exercises in PHP.
PHP
129
star
24

elm

Exercism exercises in Elm.
Elm
129
star
25

erlang

Exercism exercises in Erlang.
Erlang
124
star
26

scala

Exercism exercises in Scala.
Scala
115
star
27

fsharp

Exercism exercises in F#.
F#
106
star
28

swift

Exercism exercises in Swift.
Swift
101
star
29

bash

Exercism exercises in Bash.
Shell
92
star
30

ocaml

Exercism exercises in OCaml.
OCaml
91
star
31

legacy-docs

84
star
32

gleam

Exercism exercises in Gleam.
Gleam
81
star
33

common-lisp

Exercism exercises in Common Lisp.
Common Lisp
76
star
34

crystal

Exercism exercises in Crystal.
Crystal
70
star
35

abap

Exercism exercises in ABAP.
ABAP
63
star
36

julia

Exercism exercises in Julia.
Julia
61
star
37

nim

Exercism exercises in Nim.
Nim
51
star
38

dart

Exercism exercises in Dart.
Dart
50
star
39

DEPRECATED.exercism.rb

DEPRECATED. See http://github.com/exercism/cli for the new CLI.
Ruby
48
star
40

DEPRECATED.x-api

Application to serve exercism assignments
Ruby
46
star
41

emacs-lisp

Exercism exercises in Emacs Lisp.
Emacs Lisp
45
star
42

docs

Exercism's docs. View them at Exercism's website, not on GitHub.
42
star
43

racket

Exercism exercises in Racket.
Racket
39
star
44

zig

Exercism exercises in Zig.
Zig
38
star
45

pony

Exercism exercises in Pony.
Pony
38
star
46

discussions

For discussing things like future features, roadmap, priorities, and other things that are not directly action-oriented (yet).
37
star
47

powershell

Exercism exercises in Windows PowerShell.
PowerShell
35
star
48

scheme

Exercism exercises in Scheme.
Scheme
35
star
49

purescript

Exercism exercises in PureScript.
PureScript
35
star
50

hiring-frontend-developer

34
star
51

pr-commenter-action

The PR Commenter GitHub action posts comments on a PR that can vary depending on which files are being changed in the PR.
JavaScript
33
star
52

lua

Exercism exercises in Lua.
Lua
33
star
53

pharo-smalltalk

Exercism exercises in Pharo.
Smalltalk
33
star
54

delphi

Exercism exercises in Delphi Pascal.
Pascal
33
star
55

exalysis

Mentoring tool for the Go track on Exercism. Downloads students code, checks it and provides suggestions.
Go
33
star
56

DEPRECATED.rikki

A worker written in golang for automatically nitpicking exercism submissions.
Go
30
star
57

idris

Exercism exercises in Idris.
Idris
29
star
58

plsql

Exercism exercises in PL/SQL.
PLSQL
28
star
59

prolog

Exercism exercises in Prolog.
Prolog
27
star
60

elixir-analyzer

Elixir
27
star
61

perl5

Exercism exercises in Perl 5.
Perl
26
star
62

automated-analysis

An overview space for Automated Analysis on Exercism
26
star
63

sml

Exercism exercises in Standard ML.
Standard ML
24
star
64

lfe

Exercism exercises in Lisp Flavoured Erlang (LFE).
LFE
23
star
65

r

Exercism exercises in R.
R
23
star
66

gui

JavaScript
22
star
67

deprecated-mentors

Rust
22
star
68

fortran

Exercism exercises in Fortran.
Fortran
22
star
69

x86-64-assembly

Exercism exercises in x86-64 Assembly.
Assembly
22
star
70

raku

Exercism exercises in Raku
Raku
22
star
71

blog

Exercism's blog content
Shell
21
star
72

configlet

The official tool for managing Exercism language track repositories.
Nim
20
star
73

reasonml

Exercism exercises in ReasonML.
Reason
20
star
74

groovy

Exercism exercises in Groovy.
Groovy
19
star
75

red

Exercism exercises in Red.
Red
19
star
76

mips

Exercism exercises in MIPS Assembly.
Shell
19
star
77

vimscript

Exercism exercises in Vim script.
Vim Script
18
star
78

generic-track

Ruby
18
star
79

coq

Exercism exercises in Coq.
Shell
17
star
80

nix

Exercism exercises in Nix.
Shell
17
star
81

terraform

HCL
17
star
82

DEPRECATED.help.exercism.io

DEPRECATED. LEGACY. NO LONGER BEING WORKED ON.
JavaScript
17
star
83

d

Exercism exercises in D.
D
16
star
84

v2-configlet

Tool to assist in managing Exercism language tracks.
Go
16
star
85

coffeescript

Exercism exercises in CoffeeScript.
CoffeeScript
16
star
86

development-environment

Ruby
16
star
87

solidity

Exercism exercises in Solidity.
JavaScript
15
star
88

babashka

Exercism exercises in Babashka.
Clojure
14
star
89

javascript-analyzer

This is Exercism's automated analyzer for the JavaScript track.
TypeScript
14
star
90

interactive-cli-walkthrough

Ruby
13
star
91

DEPRECATED.v2-feedback

Please use https://github.com/exercism/exercism.io for reporting issues
13
star
92

ruby-analyzer

This is Exercism's automated analyzer for the Ruby track.
Ruby
13
star
93

csharp-analyzer

An analyser for C#
C#
12
star
94

cfml

Exercism exercises in CFML.
ColdFusion
12
star
95

gnu-apl

Exercism exercises in GNU APL.
APL
12
star
96

v3-beta

12
star
97

awk

Exercism exercises in AWK.
Shell
12
star
98

tracks-maintenance-dashboard

A dashboard for maintainers to understand the state of tracks
TypeScript
11
star
99

python-test-runner

Python
11
star
100

go-test-runner

Jupyter Notebook
11
star