GithubHelp home page GithubHelp logo

permikomnaskaltara / website Goto Github PK

View Code? Open in Web Editor NEW

This project forked from exercism/v2-website

1.0 0.0 0.0 8.09 MB

Exercism — Code practice and mentorship for everyone.

Home Page: https://exercism.io

License: GNU Affero General Public License v3.0

Ruby 61.17% JavaScript 0.44% CoffeeScript 0.30% CSS 20.41% HTML 17.69%

website's Introduction

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

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

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 (release due October 2018). Tracked at exercism/exercism#4346.

website's People

Contributors

amaliacardenas avatar average-user avatar bencoman avatar ccare avatar cohen-carlisle avatar consou avatar dstockto avatar ihid avatar jackhughesweb avatar kntsoriano avatar loriking avatar mitchellhenke avatar nextnebula avatar nickborromeo avatar pacmancoder avatar patrickmcsweeny avatar pgaspar avatar qlaille avatar rin avatar sfairchild avatar siebenschlaefer avatar smarticles101 avatar strickinato avatar tejasbubane avatar tqa236 avatar tushartyagi avatar unused avatar vinmaster avatar yannickfricke avatar zapanton avatar

Stargazers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.