everything for the World Cube Association
All of the code that runs on worldcubeassociation.org
This repository contains all of the code that runs on worldcubeassociation.org.
git clone https://github.com/thewca/worldcubeassociation.org
cd worldcubeassociation.org
.ruby-version
file to use the correct version (rvm current
or rbenv version
to confirm).
gem update --system
bundle update --bundler
gem update --system
gem install bundler
shell
(cd WcaOnRails; bundle install && bin/yarn && bundle exec overcommit --install)
If some changes are made to this hook, you will have to update it running this command from the repository's root directory: BUNDLE_GEMFILE=WcaOnRails/Gemfile bundle exec overcommit --sign
.worldcubeassociation.org
)http://localhost:3000
, run docker-compose up
and to bring it down, docker-compose down
(or just press ctrl + c in the same terminal)docker compose -f docker-compose.yml -f docker-compose.php.yml up
docker-compose exec wca_on_rails bash -c "RAILS_ENV=test bin/rake db:reset && RAILS_ENV=test bin/rake assets:precompile && bin/rspec"
shell
# Run MySQL CLI as administrator and set an empty password for the root user:
sudo mysql -u root
ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY '';
cd WcaOnRails/
bundle install && bin/yarn
bin/rake db:load:development
- Download and import the developer's database export. Depending on your computer it may take a long time. Alternatively you can run bin/rake db:reset
which will create the database and seed it with random data (it's way faster, but less representative of our website content).bin/rails server
- Run rails. The server will be accessible at localhost:3000RAILS_ENV=test bin/rake db:reset
- Set up test database.RAILS_ENV=test bin/rake assets:precompile
- Compile some assets needed for tests to run.bin/rspec
- Run tests.