Skip to content
Snippets Groups Projects
Select Git revision
  • d96ae718c393c12d06fbd60e068e73f63ef1d3cc
  • eip-develop default
  • MoshiKoi/1025/remove-special-case-notifying-author-of-threads
  • 0valt/1699/erb_lint
  • develop
  • master
  • dependabot/bundler/bundler-f02c9c4a61
  • art/1639/audit-logs
  • 0valt/725/comments
  • 0valt/categories
  • 0valt/1389/threads
  • 0valt/1509/search_tests
  • art/1348/duplicate-links
  • cellio/no-2fa-self-delete
  • art/1684/update-job-iteration
  • art/email-changes
  • 0valt/1262/thread-titles
  • temporary-branch-for-testing-ci-failures
  • dependabot/bundler/bundler-74298a5ebc
  • art/1680/flag-escalations
  • 0valt/docker
  • 0valt/1579/comments
  • v0.12.0
  • v0.11.0
  • v0.10.0
  • v0.9.0
  • v0.8.0
  • v0.7.0
  • v0.6.1
  • v0.6.0
  • v0.5.0
  • v0.4.0
  • v0.3.0
  • v1.0
34 results

qpixel

  • Clone with SSH
  • Clone with HTTPS
  • user avatar
    ArtOfCode- authored
    d96ae718
    History

    QPixel CircleCI Build Status Test coverage

    Rails-based version of our core software. Currently under active development towards MVP.

    Installation

    These instructions are assuming you already have a Unix environment available with Ruby and Bundler installed. WSL should work as well, but Windows is unlikely to.

    If you don't already have Ruby installed, use RVM or rbenv to install it before following these instructions.

    Install prerequisites

    For Linux:

    sudo apt update
    sudo apt install gcc
    sudo apt install make
    sudo apt install libmysqlclient-dev
    sudo apt install autoconf bison build-essential libssl-dev libyaml-dev libreadline-dev zlib1g-dev libncurses5-dev libffi-dev libgdbm-dev
    sudo apt install mysql-server

    For Mac:

    xcode-select --install
    brew install mysql bison openssl mysql-client
    bundle config --global build.mysql2 --with-opt-dir="$(brew --prefix openssl)"

    Install JS runtime

    If you already have Node.JS installed, you can skip this step. If not, download and install it.

    Install Redis

    If you haven't already got it, download and install Redis.

    Install Imagemagick

    If you haven't already installed Imagemagick, you'll need to install it for your system

    Download QPixel

    Clone the repository and cd into the directory:

    git clone https://github.com/codidact/qpixel
    cd qpixel

    Configure database connection

    If you weren't asked to set the root MySQL user password during mysql-server installation, the installation is likely to be using Unix authentication instead. You'll need to sign into the MySQL server with sudo mysql -u root and create a new database user for QPixel:

    CREATE USER qpixel@localhost IDENTIFIED BY 'choose_a_password_here';
    GRANT ALL ON qpixel_dev.* TO qpixel@localhost;
    GRANT ALL ON qpixel_test.* TO qpixel@localhost;
    GRANT ALL ON qpixel.* TO qpixel@localhost;

    Copy config/database.sample.yml to config/database.yml and fill in the correct host, username, and password for your environment. If you've followed these instructions (i.e. you have installed MySQL locally), the correct host is localhost or 127.0.0.1.

    You'll also need to fill in details for the Redis connection. If you've followed these instructions, the sample file should already contain the correct values for you, but if you've customised your setup you'll need to correct them.

    Set up QPixel

    Install gems:

    bundle install

    Set up the database:

    rails db:create
    rails db:schema:load
    rails r db/scripts/create_tags_path_view.rb
    rails db:migrate
    rails db:seed

    Run the server!

    rails s

    You'll need to create a Community record before the server will display any content. In a console, run:

    Community.create(name: 'Dev Community', host: 'localhost:3000')

    You can create the first user account in the application, which should be running at http://localhost:3000/. To upgrade the user account to an admin account, run rails c for a console, followed by:

    User.last.update(confirmed_at: DateTime.now, is_global_admin: true)

    License

    AGPL licensed

    Contributing

    Contributions are welcome - please read the CONTRIBUTING document before you start and look at the TODO list for things to do.