Post History
#3: Post edited
- # Debian-based (including on WSL)
- Required time: less than 1 hour.
- This workflow was tested on
- :
- - **Debian 12** (fresh install with [debian-12.0.0-amd64-netinst.iso](https://cdimage.debian.org/debian-cd/current/amd64/iso-cd/) on Virtual Box 7.0.8 and Windows 11 22H2 host)
- - **Debian 11 on WSL2** (Windows Subsystem Linux Version 2)[^1] (on Windows 11 22H2 host).
- - **Ubuntu 22.04.2 LTS on WSL2** (on Windows 11 22H2 host).
- ## 1. Prerequisites
```- sudo apt update
- sudo apt install gcc
- sudo apt install make
- sudo apt install default-libmysqlclient-dev # libmysqlclient-dev not disponible on Debian
- sudo apt install libmagickwand-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 curl
- sudo apt install nodejs
- sudo apt install redis
- sudo apt install imagemagick
- sudo apt install git
- ```
- ### 1.1. Database server
- MySQL is not available on the Debian default distribution, thus MariaDB can be installed instead[^2]:
```- sudo apt install mariadb-server
- ```
- ### 1.2. Ruby install
- Example with rvm:
```- curl -sSL https://rvm.io/mpapis.asc | gpg --import -
- curl -sSL https://rvm.io/pkuczynski.asc | gpg --import -
- curl -sSL https://get.rvm.io | bash -s stable
- ```
- If rvm installation is complete it will tells you which command to run in order to be able to use the `rvm` command. In the installation outputs sample below, this command is (you need to run this command in each new openend terminal):
```- source /home/zetyty/.rvm/scripts/rvm
- ```
- <details>
- <summary>
- Installation outputs sample on Debian 12 (for user "zetyty"):
- </summary>
```- ~$ curl -sSL https://get.rvm.io | bash -s stable
- Downloading https://github.com/rvm/rvm/archive/1.29.12.tar.gz
- Downloading https://github.com/rvm/rvm/releases/download/1.29.12/1.29.12.tar.gz.asc
- gpg: Signature made Fri 15 Jan 2021 07:46:22 PM CET
- gpg: using RSA key 7D2BAF1CF37B13E2069D6956105BD0E739499BDB
- gpg: Good signature from "Piotr Kuczynski <[email protected]>" [unknown]
- gpg: WARNING: This key is not certified with a trusted signature!
- gpg: There is no indication that the signature belongs to the owner.
- Primary key fingerprint: 7D2B AF1C F37B 13E2 069D 6956 105B D0E7 3949 9BDB
- GPG verified '/home/zetyty/.rvm/archives/rvm-1.29.12.tgz'
- Installing RVM to /home/zetyty/.rvm/
- Adding rvm PATH line to /home/zetyty/.profile /home/zetyty/.mkshrc /home/zetyty/.bashrc /home/zetyty/.zshrc.
- Adding rvm loading line to /home/zetyty/.profile /home/zetyty/.bash_profile /home/zetyty/.zlogin.
- Installation of RVM in /home/zetyty/.rvm/ is almost complete:
- * To start using RVM you need to run `source /home/zetyty/.rvm/scripts/rvm`
- in all your open shell windows, in rare cases you need to reopen all shell windows.
- Thanks for installing RVM 🙏
- Please consider donating to our open collective to help us maintain RVM.
- 👉 Donate: https://opencollective.com/rvm/donate
- ```
- </details>
- Then, install ruby:
```- rvm install 3.1.2
- ```
- ## 2. QPixel
- Download and install QPixel:
```- git clone https://github.com/codidact/qpixel
- cd qpixel
- bundle install
- ```
- <details>
- <summary>
- `bundle install` outputs sample on Debian 12 (QPixel install in `/home` directory):
- </summary>
```- ~/qpixel$ bundle install
- Bundler 2.3.7 is running, but your lockfile was generated with 2.4.13. Installing Bundler 2.4.13 and restarting using that version.
- Fetching gem metadata from https://rubygems.org/.
- Fetching bundler 2.4.13
- Installing bundler 2.4.13
- Fetching gem metadata from https://rubygems.org/.........
- Using rake 13.0.6
- Fetching concurrent-ruby 1.1.10
- Installing concurrent-ruby 1.1.10
- Fetching i18n 1.12.0
- Installing i18n 1.12.0
- Fetching minitest 5.16.3
- Installing minitest 5.16.3
- Fetching tzinfo 2.0.5
- Installing tzinfo 2.0.5
- Fetching activesupport 7.0.4
- Installing activesupport 7.0.4
- Fetching builder 3.2.4
- Installing builder 3.2.4
- Fetching erubi 1.11.0
- Installing erubi 1.11.0
- Fetching racc 1.6.2
- Installing racc 1.6.2 with native extensions
- Fetching nokogiri 1.14.3 (x86_64-linux)
- Installing nokogiri 1.14.3 (x86_64-linux)
- Fetching rails-dom-testing 2.0.3
- Installing rails-dom-testing 2.0.3
- Fetching crass 1.0.6
- Installing crass 1.0.6
- Fetching loofah 2.19.1
- Installing loofah 2.19.1
- Fetching rails-html-sanitizer 1.4.4
- Installing rails-html-sanitizer 1.4.4
- Fetching actionview 7.0.4
- Installing actionview 7.0.4
- Fetching rack 2.2.6.4
- Installing rack 2.2.6.4
- Fetching rack-test 2.0.2
- Installing rack-test 2.0.2
- Fetching actionpack 7.0.4
- Installing actionpack 7.0.4
- Fetching nio4r 2.5.8
- Installing nio4r 2.5.8 with native extensions
- Fetching websocket-extensions 0.1.5
- Installing websocket-extensions 0.1.5
- Fetching websocket-driver 0.7.5
- Installing websocket-driver 0.7.5 with native extensions
- Fetching actioncable 7.0.4
- Installing actioncable 7.0.4
- Fetching globalid 1.0.1
- Installing globalid 1.0.1
- Fetching activejob 7.0.4
- Installing activejob 7.0.4
- Fetching activemodel 7.0.4
- Installing activemodel 7.0.4
- Fetching activerecord 7.0.4
- Installing activerecord 7.0.4
- Fetching marcel 1.0.2
- Installing marcel 1.0.2
- Fetching mini_mime 1.1.2
- Installing mini_mime 1.1.2
- Fetching activestorage 7.0.4
- Installing activestorage 7.0.4
- Fetching mail 2.7.1
- Installing mail 2.7.1
- Using digest 3.1.0
- Fetching timeout 0.3.0
- Installing timeout 0.3.0
- Fetching net-protocol 0.1.3
- Installing net-protocol 0.1.3
- Fetching strscan 3.0.4
- Installing strscan 3.0.4 with native extensions
- Using net-imap 0.2.3
- Using net-pop 0.1.1
- Using net-smtp 0.3.1
- Fetching actionmailbox 7.0.4
- Installing actionmailbox 7.0.4
- Fetching actionmailer 7.0.4
- Installing actionmailer 7.0.4
- Fetching actiontext 7.0.4
- Installing actiontext 7.0.4
- Fetching public_suffix 5.0.0
- Installing public_suffix 5.0.0
- Fetching addressable 2.8.1
- Installing addressable 2.8.1
- Fetching ast 2.4.2
- Installing ast 2.4.2
- Fetching awesome_print 1.9.2
- Installing awesome_print 1.9.2
- Fetching aws-eventstream 1.2.0
- Installing aws-eventstream 1.2.0
- Fetching aws-partitions 1.628.0
- Installing aws-partitions 1.628.0
- Fetching aws-sigv4 1.5.1
- Installing aws-sigv4 1.5.1
- Fetching jmespath 1.6.1
- Installing jmespath 1.6.1
- Fetching aws-sdk-core 3.145.0
- Installing aws-sdk-core 3.145.0
- Fetching aws-sdk-kms 1.58.0
- Installing aws-sdk-kms 1.58.0
- Fetching aws-sdk-s3 1.114.0
- Installing aws-sdk-s3 1.114.0
- Fetching mime-types-data 3.2022.0105
- Installing mime-types-data 3.2022.0105
- Fetching mime-types 3.4.1
- Installing mime-types 3.4.1
- Using rexml 3.2.5
- Fetching xml-simple 1.1.9
- Installing xml-simple 1.1.9
- Fetching aws-ses-v4 0.8.1
- Installing aws-ses-v4 0.8.1
- Fetching bcrypt 3.1.18
- Installing bcrypt 3.1.18 with native extensions
- Fetching bindex 0.8.1
- Installing bindex 0.8.1 with native extensions
- Using bundler 2.4.13
- Fetching byebug 11.1.3
- Installing byebug 11.1.3 with native extensions
- Using matrix 0.4.2
- Fetching regexp_parser 2.5.0
- Installing regexp_parser 2.5.0
- Fetching xpath 3.2.0
- Installing xpath 3.2.0
- Fetching capybara 3.38.0
- Installing capybara 3.38.0
- Fetching chartkick 4.2.1
- Installing chartkick 4.2.1
- Fetching chronic 0.10.2
- Installing chronic 0.10.2
- Fetching chunky_png 1.4.0
- Installing chunky_png 1.4.0
- Fetching coffee-script-source 1.12.2
- Installing coffee-script-source 1.12.2
- Fetching execjs 2.8.1
- Installing execjs 2.8.1
- Fetching coffee-script 2.4.1
- Installing coffee-script 2.4.1
- Fetching method_source 1.0.0
- Installing method_source 1.0.0
- Fetching thor 1.2.1
- Installing thor 1.2.1
- Fetching zeitwerk 2.6.0
- Installing zeitwerk 2.6.0
- Fetching railties 7.0.4
- Installing railties 7.0.4
- Fetching coffee-rails 5.0.0
- Installing coffee-rails 5.0.0
- Fetching commonmarker 0.23.9
- Installing commonmarker 0.23.9 with native extensions
- Fetching counter_culture 3.2.1
- Installing counter_culture 3.2.1
- Fetching json 2.6.2
- Installing json 2.6.2 with native extensions
- Fetching docile 1.4.0
- Installing docile 1.4.0
- Fetching simplecov-html 0.10.2
- Installing simplecov-html 0.10.2
- Fetching simplecov 0.16.1
- Installing simplecov 0.16.1
- Fetching sync 0.5.0
- Installing sync 0.5.0
- Fetching tins 1.31.1
- Installing tins 1.31.1
- Fetching term-ansicolor 1.7.1
- Installing term-ansicolor 1.7.1
- Fetching coveralls 0.8.23
- Installing coveralls 0.8.23
- Fetching css_parser 1.11.0
- Installing css_parser 1.11.0
- Fetching orm_adapter 0.5.0
- Installing orm_adapter 0.5.0
- Fetching responders 3.0.1
- Installing responders 3.0.1
- Fetching warden 1.2.9
- Installing warden 1.2.9
- Fetching devise 4.8.1
- Installing devise 4.8.1
- Fetching ruby-saml 1.14.0
- Installing ruby-saml 1.14.0
- Fetching devise_saml_authenticatable 1.9.0
- Installing devise_saml_authenticatable 1.9.0
- Fetching diffy 3.4.2
- Installing diffy 3.4.2
- Fetching e2mmap 0.1.0
- Installing e2mmap 0.1.0
- Fetching fastimage 2.2.6
- Installing fastimage 2.2.6
- Fetching ffi 1.15.5
- Installing ffi 1.15.5 with native extensions
- Fetching flamegraph 0.9.5
- Installing flamegraph 0.9.5
- Fetching groupdate 6.1.0
- Installing groupdate 6.1.0
- Fetching hashie 5.0.0
- Installing hashie 5.0.0
- Fetching htmlentities 4.3.4
- Installing htmlentities 4.3.4
- Fetching mini_magick 4.11.0
- Installing mini_magick 4.11.0
- Fetching ruby-vips 2.1.4
- Installing ruby-vips 2.1.4
- Fetching image_processing 1.12.2
- Installing image_processing 1.12.2
- Fetching jbuilder 2.11.5
- Installing jbuilder 2.11.5
- Fetching jquery-rails 4.5.0
- Installing jquery-rails 4.5.0
- Fetching launchy 2.5.0
- Installing launchy 2.5.0
- Fetching letter_opener 1.8.1
- Installing letter_opener 1.8.1
- Fetching letter_opener_web 2.0.0
- Installing letter_opener_web 2.0.0
- Fetching rb-fsevent 0.11.2
- Installing rb-fsevent 0.11.2
- Fetching rb-inotify 0.10.1
- Installing rb-inotify 0.10.1
- Fetching listen 3.7.1
- Installing listen 3.7.1
- Fetching memory_profiler 1.0.0
- Installing memory_profiler 1.0.0
- Fetching minitest-ci 3.4.0
- Installing minitest-ci 3.4.0
- Fetching mysql2 0.5.4
- Installing mysql2 0.5.4 with native extensions
- Fetching rack-protection 2.2.2
- Installing rack-protection 2.2.2
- Fetching omniauth 2.1.0
- Installing omniauth 2.1.0
- Fetching parallel 1.22.1
- Installing parallel 1.22.1
- Fetching parser 3.1.2.1
- Installing parser 3.1.2.1
- Fetching pkg-config 1.5.1
- Installing pkg-config 1.5.1
- Fetching premailer 1.16.0
- Installing premailer 1.16.0
- Fetching premailer-rails 1.11.1
- Installing premailer-rails 1.11.1
- Fetching puma 5.6.5
- Installing puma 5.6.5 with native extensions
- Fetching rack-mini-profiler 3.0.0
- Installing rack-mini-profiler 3.0.0
- Fetching rails 7.0.4
- Installing rails 7.0.4
- Fetching rails-controller-testing 1.0.5
- Installing rails-controller-testing 1.0.5
- Fetching rainbow 3.1.1
- Installing rainbow 3.1.1
- Fetching redis 4.8.0
- Installing redis 4.8.0
- Fetching reverse_markdown 2.1.1
- Installing reverse_markdown 2.1.1
- Fetching rmagick 5.2.0
- Installing rmagick 5.2.0 with native extensions
- Fetching rotp 6.2.0
- Installing rotp 6.2.0
- Fetching rqrcode_core 1.2.0
- Installing rqrcode_core 1.2.0
- Fetching rqrcode 2.1.2
- Installing rqrcode 2.1.2
- Fetching rubocop-ast 1.21.0
- Installing rubocop-ast 1.21.0
- Fetching ruby-progressbar 1.11.0
- Installing ruby-progressbar 1.11.0
- Fetching unicode-display_width 2.2.0
- Installing unicode-display_width 2.2.0
- Fetching rubocop 1.36.0
- Installing rubocop 1.36.0
- Fetching rubocop-rails 2.16.0
- Installing rubocop-rails 2.16.0
- Fetching rubyzip 2.3.2
- Installing rubyzip 2.3.2
- Fetching sassc 2.4.0
- Installing sassc 2.4.0 with native extensions
- Fetching sprockets 4.1.1
- Installing sprockets 4.1.1
- Fetching sprockets-rails 3.4.2
- Installing sprockets-rails 3.4.2
- Fetching tilt 2.0.11
- Installing tilt 2.0.11
- Fetching sassc-rails 2.1.2
- Installing sassc-rails 2.1.2
- Fetching sass-rails 6.0.0
- Installing sass-rails 6.0.0
- Fetching websocket 1.2.9
- Installing websocket 1.2.9
- Fetching selenium-webdriver 4.7.1
- Installing selenium-webdriver 4.7.1
- Fetching spring 4.0.0
- Installing spring 4.0.0
- Fetching stackprof 0.2.21
- Installing stackprof 0.2.21 with native extensions
- Fetching stripe 5.55.0
- Installing stripe 5.55.0
- Fetching terser 1.1.12
- Installing terser 1.1.12
- Fetching thwait 0.2.0
- Installing thwait 0.2.0
- Fetching tzinfo-data 1.2022.3
- Installing tzinfo-data 1.2022.3
- Fetching web-console 4.2.0
- Installing web-console 4.2.0
- Fetching webdrivers 5.2.0
- Installing webdrivers 5.2.0
- Fetching whenever 1.0.0
- Installing whenever 1.0.0
- Fetching will_paginate 3.3.1
- Installing will_paginate 3.3.1
- Fetching will_paginate-bootstrap 1.0.2
- Installing will_paginate-bootstrap 1.0.2
- Bundle complete! 58 Gemfile dependencies, 157 gems now installed.
- Use `bundle info [gemname]` to see where a bundled gem is installed.
- ```
- </details>
- If the bundle install failed because of some kind of "PermissionError", you may have several ruby installs on your system and then you can take a look at [this post](https://collab.codidact.org/posts/288973).
- ## 3. Start MariaDB and redis servers
- Run:
```- sudo systemctl start mariadb
- ```
- **On WSL** we can't use `systemctl` but `service` instead (see [this answer](https://linux.codidact.com/posts/288812/288823#answer-288823)), it is also necessary to **stop the execution of a MySQL/MariaDB server on the Windows Host and on other running WSL** (because this prevents the server from being launched on the current WSL)[^3]:
```- sudo service mariadb start
- ```
- And don't forgot redis:
```- sudo service redis-server start
- ```
- ## 4. Final steps
- At this point, you can follow the workflow described in [this answer](https://collab.codidact.org/posts/280451/280452#answer-280452) (starting with new database user creation and generation of `config/database.yml` and `config/storage.yml`).
- **But, with MariaDB**, "you will need to replace all occurrences of `utf8mb4_0900_ai_ci` with `utf8mb4_unicode_ci` in `db/schema.rb`" (4 occurrences) [[cited from the GitHub installation Guide](https://github.com/codidact/qpixel/blob/develop/INSTALLATION.md)].
- NB: if you stop your system before the `rails s` "big moment", be sure you have `redis-server` running (you can do `sudo service redis-server restart`). Same comment for `mariadb-server`.
- [^1]: I was not able to run QPixel on Debian WSL1 because I was not able to run the rails console (but I got no problem with WSL2). Also the install is significantly faster with WSL2.
- [^2]: If you really want to install MySQL, you can take a look at [this discussion](https://linux.codidact.com/posts/288849), [this answer regarding Dockerized instance of MySQL on WSL or directly on the Windows Host](https://linux.codidact.com/posts/288812/288970#answer-288970) and [this official workflow](https://dev.mysql.com/doc/mysql-installation-excerpt/8.0/en/linux-installation-debian.html)).
- [^3]: To stop MySQL on Windows: Open a on command prompt and run `net stop MySQL80`. On other running WSL, (i) you can stop MySQL/MariaDB server on other WSL or (ii) stop some running WSL by opening a PowerShell and run `wsl -t DISTRO-NAME` - you can find the list of all `DISTRO-NAME` installed and their status (running/stopped) with `wsl -l -v`.
- # Debian-based (including on WSL)
- Required time: less than 1 hour.
- This workflow was tested on
- :
- - **Debian 12** (fresh install with [debian-12.0.0-amd64-netinst.iso](https://cdimage.debian.org/debian-cd/current/amd64/iso-cd/) on Virtual Box 7.0.8 and Windows 11 22H2 host)
- - **Debian 11 on WSL2** (Windows Subsystem Linux Version 2)[^1] (on Windows 11 22H2 host).
- - **Ubuntu 22.04.2 LTS on WSL2** (on Windows 11 22H2 host).
- ## 1. Prerequisites
- ```bash
- sudo apt update
- sudo apt install gcc
- sudo apt install make
- sudo apt install default-libmysqlclient-dev # libmysqlclient-dev not disponible on Debian
- sudo apt install libmagickwand-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 curl
- sudo apt install nodejs
- sudo apt install redis
- sudo apt install imagemagick
- sudo apt install git
- ```
- ### 1.1. Database server
- MySQL is not available on the Debian default distribution, thus MariaDB can be installed instead[^2]:
- ```bash
- sudo apt install mariadb-server
- ```
- ### 1.2. Ruby install
- Example with rvm:
- ```bash
- curl -sSL https://rvm.io/mpapis.asc | gpg --import -
- curl -sSL https://rvm.io/pkuczynski.asc | gpg --import -
- curl -sSL https://get.rvm.io | bash -s stable
- ```
- If rvm installation is complete it will tells you which command to run in order to be able to use the `rvm` command. In the installation outputs sample below, this command is (you need to run this command in each new openend terminal):
- ```bash
- source /home/zetyty/.rvm/scripts/rvm
- ```
- <details>
- <summary>
- Installation outputs sample on Debian 12 (for user "zetyty"):
- </summary>
- ```bash
- ~$ curl -sSL https://get.rvm.io | bash -s stable
- Downloading https://github.com/rvm/rvm/archive/1.29.12.tar.gz
- Downloading https://github.com/rvm/rvm/releases/download/1.29.12/1.29.12.tar.gz.asc
- gpg: Signature made Fri 15 Jan 2021 07:46:22 PM CET
- gpg: using RSA key 7D2BAF1CF37B13E2069D6956105BD0E739499BDB
- gpg: Good signature from "Piotr Kuczynski <[email protected]>" [unknown]
- gpg: WARNING: This key is not certified with a trusted signature!
- gpg: There is no indication that the signature belongs to the owner.
- Primary key fingerprint: 7D2B AF1C F37B 13E2 069D 6956 105B D0E7 3949 9BDB
- GPG verified '/home/zetyty/.rvm/archives/rvm-1.29.12.tgz'
- Installing RVM to /home/zetyty/.rvm/
- Adding rvm PATH line to /home/zetyty/.profile /home/zetyty/.mkshrc /home/zetyty/.bashrc /home/zetyty/.zshrc.
- Adding rvm loading line to /home/zetyty/.profile /home/zetyty/.bash_profile /home/zetyty/.zlogin.
- Installation of RVM in /home/zetyty/.rvm/ is almost complete:
- * To start using RVM you need to run `source /home/zetyty/.rvm/scripts/rvm`
- in all your open shell windows, in rare cases you need to reopen all shell windows.
- Thanks for installing RVM 🙏
- Please consider donating to our open collective to help us maintain RVM.
- 👉 Donate: https://opencollective.com/rvm/donate
- ```
- </details>
- Then, install ruby:
- ```bash
- rvm install 3.1.2
- ```
- ## 2. QPixel
- Download and install QPixel:
- ```bash
- git clone https://github.com/codidact/qpixel
- cd qpixel
- bundle install
- ```
- <details>
- <summary>
- `bundle install` outputs sample on Debian 12 (QPixel install in `/home` directory):
- </summary>
- ```bash
- ~/qpixel$ bundle install
- Bundler 2.3.7 is running, but your lockfile was generated with 2.4.13. Installing Bundler 2.4.13 and restarting using that version.
- Fetching gem metadata from https://rubygems.org/.
- Fetching bundler 2.4.13
- Installing bundler 2.4.13
- Fetching gem metadata from https://rubygems.org/.........
- Using rake 13.0.6
- Fetching concurrent-ruby 1.1.10
- Installing concurrent-ruby 1.1.10
- Fetching i18n 1.12.0
- Installing i18n 1.12.0
- Fetching minitest 5.16.3
- Installing minitest 5.16.3
- Fetching tzinfo 2.0.5
- Installing tzinfo 2.0.5
- Fetching activesupport 7.0.4
- Installing activesupport 7.0.4
- Fetching builder 3.2.4
- Installing builder 3.2.4
- Fetching erubi 1.11.0
- Installing erubi 1.11.0
- Fetching racc 1.6.2
- Installing racc 1.6.2 with native extensions
- Fetching nokogiri 1.14.3 (x86_64-linux)
- Installing nokogiri 1.14.3 (x86_64-linux)
- Fetching rails-dom-testing 2.0.3
- Installing rails-dom-testing 2.0.3
- Fetching crass 1.0.6
- Installing crass 1.0.6
- Fetching loofah 2.19.1
- Installing loofah 2.19.1
- Fetching rails-html-sanitizer 1.4.4
- Installing rails-html-sanitizer 1.4.4
- Fetching actionview 7.0.4
- Installing actionview 7.0.4
- Fetching rack 2.2.6.4
- Installing rack 2.2.6.4
- Fetching rack-test 2.0.2
- Installing rack-test 2.0.2
- Fetching actionpack 7.0.4
- Installing actionpack 7.0.4
- Fetching nio4r 2.5.8
- Installing nio4r 2.5.8 with native extensions
- Fetching websocket-extensions 0.1.5
- Installing websocket-extensions 0.1.5
- Fetching websocket-driver 0.7.5
- Installing websocket-driver 0.7.5 with native extensions
- Fetching actioncable 7.0.4
- Installing actioncable 7.0.4
- Fetching globalid 1.0.1
- Installing globalid 1.0.1
- Fetching activejob 7.0.4
- Installing activejob 7.0.4
- Fetching activemodel 7.0.4
- Installing activemodel 7.0.4
- Fetching activerecord 7.0.4
- Installing activerecord 7.0.4
- Fetching marcel 1.0.2
- Installing marcel 1.0.2
- Fetching mini_mime 1.1.2
- Installing mini_mime 1.1.2
- Fetching activestorage 7.0.4
- Installing activestorage 7.0.4
- Fetching mail 2.7.1
- Installing mail 2.7.1
- Using digest 3.1.0
- Fetching timeout 0.3.0
- Installing timeout 0.3.0
- Fetching net-protocol 0.1.3
- Installing net-protocol 0.1.3
- Fetching strscan 3.0.4
- Installing strscan 3.0.4 with native extensions
- Using net-imap 0.2.3
- Using net-pop 0.1.1
- Using net-smtp 0.3.1
- Fetching actionmailbox 7.0.4
- Installing actionmailbox 7.0.4
- Fetching actionmailer 7.0.4
- Installing actionmailer 7.0.4
- Fetching actiontext 7.0.4
- Installing actiontext 7.0.4
- Fetching public_suffix 5.0.0
- Installing public_suffix 5.0.0
- Fetching addressable 2.8.1
- Installing addressable 2.8.1
- Fetching ast 2.4.2
- Installing ast 2.4.2
- Fetching awesome_print 1.9.2
- Installing awesome_print 1.9.2
- Fetching aws-eventstream 1.2.0
- Installing aws-eventstream 1.2.0
- Fetching aws-partitions 1.628.0
- Installing aws-partitions 1.628.0
- Fetching aws-sigv4 1.5.1
- Installing aws-sigv4 1.5.1
- Fetching jmespath 1.6.1
- Installing jmespath 1.6.1
- Fetching aws-sdk-core 3.145.0
- Installing aws-sdk-core 3.145.0
- Fetching aws-sdk-kms 1.58.0
- Installing aws-sdk-kms 1.58.0
- Fetching aws-sdk-s3 1.114.0
- Installing aws-sdk-s3 1.114.0
- Fetching mime-types-data 3.2022.0105
- Installing mime-types-data 3.2022.0105
- Fetching mime-types 3.4.1
- Installing mime-types 3.4.1
- Using rexml 3.2.5
- Fetching xml-simple 1.1.9
- Installing xml-simple 1.1.9
- Fetching aws-ses-v4 0.8.1
- Installing aws-ses-v4 0.8.1
- Fetching bcrypt 3.1.18
- Installing bcrypt 3.1.18 with native extensions
- Fetching bindex 0.8.1
- Installing bindex 0.8.1 with native extensions
- Using bundler 2.4.13
- Fetching byebug 11.1.3
- Installing byebug 11.1.3 with native extensions
- Using matrix 0.4.2
- Fetching regexp_parser 2.5.0
- Installing regexp_parser 2.5.0
- Fetching xpath 3.2.0
- Installing xpath 3.2.0
- Fetching capybara 3.38.0
- Installing capybara 3.38.0
- Fetching chartkick 4.2.1
- Installing chartkick 4.2.1
- Fetching chronic 0.10.2
- Installing chronic 0.10.2
- Fetching chunky_png 1.4.0
- Installing chunky_png 1.4.0
- Fetching coffee-script-source 1.12.2
- Installing coffee-script-source 1.12.2
- Fetching execjs 2.8.1
- Installing execjs 2.8.1
- Fetching coffee-script 2.4.1
- Installing coffee-script 2.4.1
- Fetching method_source 1.0.0
- Installing method_source 1.0.0
- Fetching thor 1.2.1
- Installing thor 1.2.1
- Fetching zeitwerk 2.6.0
- Installing zeitwerk 2.6.0
- Fetching railties 7.0.4
- Installing railties 7.0.4
- Fetching coffee-rails 5.0.0
- Installing coffee-rails 5.0.0
- Fetching commonmarker 0.23.9
- Installing commonmarker 0.23.9 with native extensions
- Fetching counter_culture 3.2.1
- Installing counter_culture 3.2.1
- Fetching json 2.6.2
- Installing json 2.6.2 with native extensions
- Fetching docile 1.4.0
- Installing docile 1.4.0
- Fetching simplecov-html 0.10.2
- Installing simplecov-html 0.10.2
- Fetching simplecov 0.16.1
- Installing simplecov 0.16.1
- Fetching sync 0.5.0
- Installing sync 0.5.0
- Fetching tins 1.31.1
- Installing tins 1.31.1
- Fetching term-ansicolor 1.7.1
- Installing term-ansicolor 1.7.1
- Fetching coveralls 0.8.23
- Installing coveralls 0.8.23
- Fetching css_parser 1.11.0
- Installing css_parser 1.11.0
- Fetching orm_adapter 0.5.0
- Installing orm_adapter 0.5.0
- Fetching responders 3.0.1
- Installing responders 3.0.1
- Fetching warden 1.2.9
- Installing warden 1.2.9
- Fetching devise 4.8.1
- Installing devise 4.8.1
- Fetching ruby-saml 1.14.0
- Installing ruby-saml 1.14.0
- Fetching devise_saml_authenticatable 1.9.0
- Installing devise_saml_authenticatable 1.9.0
- Fetching diffy 3.4.2
- Installing diffy 3.4.2
- Fetching e2mmap 0.1.0
- Installing e2mmap 0.1.0
- Fetching fastimage 2.2.6
- Installing fastimage 2.2.6
- Fetching ffi 1.15.5
- Installing ffi 1.15.5 with native extensions
- Fetching flamegraph 0.9.5
- Installing flamegraph 0.9.5
- Fetching groupdate 6.1.0
- Installing groupdate 6.1.0
- Fetching hashie 5.0.0
- Installing hashie 5.0.0
- Fetching htmlentities 4.3.4
- Installing htmlentities 4.3.4
- Fetching mini_magick 4.11.0
- Installing mini_magick 4.11.0
- Fetching ruby-vips 2.1.4
- Installing ruby-vips 2.1.4
- Fetching image_processing 1.12.2
- Installing image_processing 1.12.2
- Fetching jbuilder 2.11.5
- Installing jbuilder 2.11.5
- Fetching jquery-rails 4.5.0
- Installing jquery-rails 4.5.0
- Fetching launchy 2.5.0
- Installing launchy 2.5.0
- Fetching letter_opener 1.8.1
- Installing letter_opener 1.8.1
- Fetching letter_opener_web 2.0.0
- Installing letter_opener_web 2.0.0
- Fetching rb-fsevent 0.11.2
- Installing rb-fsevent 0.11.2
- Fetching rb-inotify 0.10.1
- Installing rb-inotify 0.10.1
- Fetching listen 3.7.1
- Installing listen 3.7.1
- Fetching memory_profiler 1.0.0
- Installing memory_profiler 1.0.0
- Fetching minitest-ci 3.4.0
- Installing minitest-ci 3.4.0
- Fetching mysql2 0.5.4
- Installing mysql2 0.5.4 with native extensions
- Fetching rack-protection 2.2.2
- Installing rack-protection 2.2.2
- Fetching omniauth 2.1.0
- Installing omniauth 2.1.0
- Fetching parallel 1.22.1
- Installing parallel 1.22.1
- Fetching parser 3.1.2.1
- Installing parser 3.1.2.1
- Fetching pkg-config 1.5.1
- Installing pkg-config 1.5.1
- Fetching premailer 1.16.0
- Installing premailer 1.16.0
- Fetching premailer-rails 1.11.1
- Installing premailer-rails 1.11.1
- Fetching puma 5.6.5
- Installing puma 5.6.5 with native extensions
- Fetching rack-mini-profiler 3.0.0
- Installing rack-mini-profiler 3.0.0
- Fetching rails 7.0.4
- Installing rails 7.0.4
- Fetching rails-controller-testing 1.0.5
- Installing rails-controller-testing 1.0.5
- Fetching rainbow 3.1.1
- Installing rainbow 3.1.1
- Fetching redis 4.8.0
- Installing redis 4.8.0
- Fetching reverse_markdown 2.1.1
- Installing reverse_markdown 2.1.1
- Fetching rmagick 5.2.0
- Installing rmagick 5.2.0 with native extensions
- Fetching rotp 6.2.0
- Installing rotp 6.2.0
- Fetching rqrcode_core 1.2.0
- Installing rqrcode_core 1.2.0
- Fetching rqrcode 2.1.2
- Installing rqrcode 2.1.2
- Fetching rubocop-ast 1.21.0
- Installing rubocop-ast 1.21.0
- Fetching ruby-progressbar 1.11.0
- Installing ruby-progressbar 1.11.0
- Fetching unicode-display_width 2.2.0
- Installing unicode-display_width 2.2.0
- Fetching rubocop 1.36.0
- Installing rubocop 1.36.0
- Fetching rubocop-rails 2.16.0
- Installing rubocop-rails 2.16.0
- Fetching rubyzip 2.3.2
- Installing rubyzip 2.3.2
- Fetching sassc 2.4.0
- Installing sassc 2.4.0 with native extensions
- Fetching sprockets 4.1.1
- Installing sprockets 4.1.1
- Fetching sprockets-rails 3.4.2
- Installing sprockets-rails 3.4.2
- Fetching tilt 2.0.11
- Installing tilt 2.0.11
- Fetching sassc-rails 2.1.2
- Installing sassc-rails 2.1.2
- Fetching sass-rails 6.0.0
- Installing sass-rails 6.0.0
- Fetching websocket 1.2.9
- Installing websocket 1.2.9
- Fetching selenium-webdriver 4.7.1
- Installing selenium-webdriver 4.7.1
- Fetching spring 4.0.0
- Installing spring 4.0.0
- Fetching stackprof 0.2.21
- Installing stackprof 0.2.21 with native extensions
- Fetching stripe 5.55.0
- Installing stripe 5.55.0
- Fetching terser 1.1.12
- Installing terser 1.1.12
- Fetching thwait 0.2.0
- Installing thwait 0.2.0
- Fetching tzinfo-data 1.2022.3
- Installing tzinfo-data 1.2022.3
- Fetching web-console 4.2.0
- Installing web-console 4.2.0
- Fetching webdrivers 5.2.0
- Installing webdrivers 5.2.0
- Fetching whenever 1.0.0
- Installing whenever 1.0.0
- Fetching will_paginate 3.3.1
- Installing will_paginate 3.3.1
- Fetching will_paginate-bootstrap 1.0.2
- Installing will_paginate-bootstrap 1.0.2
- Bundle complete! 58 Gemfile dependencies, 157 gems now installed.
- Use `bundle info [gemname]` to see where a bundled gem is installed.
- ```
- </details>
- If the bundle install failed because of some kind of "PermissionError", you may have several ruby installs on your system and then you can take a look at [this post](https://collab.codidact.org/posts/288973).
- ## 3. Start MariaDB and redis servers
- Run:
- ```bash
- sudo systemctl start mariadb
- ```
- **On WSL** we can't use `systemctl` but `service` instead (see [this answer](https://linux.codidact.com/posts/288812/288823#answer-288823)), it is also necessary to **stop the execution of a MySQL/MariaDB server on the Windows Host and on other running WSL** (because this prevents the server from being launched on the current WSL)[^3]:
- ```bash
- sudo service mariadb start
- ```
- And don't forgot redis:
- ```bash
- sudo service redis-server start
- ```
- ## 4. Final steps
- At this point, you can follow the workflow described in [this answer](https://collab.codidact.org/posts/280451/280452#answer-280452) (starting with new database user creation and generation of `config/database.yml` and `config/storage.yml`).
- **But, with MariaDB**, "you will need to replace all occurrences of `utf8mb4_0900_ai_ci` with `utf8mb4_unicode_ci` in `db/schema.rb`" (4 occurrences) [[cited from the GitHub installation Guide](https://github.com/codidact/qpixel/blob/develop/INSTALLATION.md)].
- NB: if you stop your system before the `rails s` "big moment", be sure you have `redis-server` running (you can do `sudo service redis-server restart`). Same comment for `mariadb-server`.
- [^1]: I was not able to run QPixel on Debian WSL1 because I was not able to run the rails console (but I got no problem with WSL2). Also the install is significantly faster with WSL2.
- [^2]: If you really want to install MySQL, you can take a look at [this discussion](https://linux.codidact.com/posts/288849), [this answer regarding Dockerized instance of MySQL on WSL or directly on the Windows Host](https://linux.codidact.com/posts/288812/288970#answer-288970) and [this official workflow](https://dev.mysql.com/doc/mysql-installation-excerpt/8.0/en/linux-installation-debian.html)).
- [^3]: To stop MySQL on Windows: Open a on command prompt and run `net stop MySQL80`. On other running WSL, (i) you can stop MySQL/MariaDB server on other WSL or (ii) stop some running WSL by opening a PowerShell and run `wsl -t DISTRO-NAME` - you can find the list of all `DISTRO-NAME` installed and their status (running/stopped) with `wsl -l -v`.
#2: Post edited
# Debian-based (desktop and WSL2)- Required time: less than 1 hour.
- This workflow was tested on
- :
- - **Debian 12** (fresh install with [debian-12.0.0-amd64-netinst.iso](https://cdimage.debian.org/debian-cd/current/amd64/iso-cd/) on Virtual Box 7.0.8 and Windows 11 22H2 host)
- - **Debian 11 on WSL2** (Windows Subsystem Linux Version 2)[^1] (on Windows 11 22H2 host).
- - **Ubuntu 22.04.2 LTS on WSL2** (on Windows 11 22H2 host).
- ## 1. Prerequisites
- ```
- sudo apt update
- sudo apt install gcc
- sudo apt install make
- sudo apt install default-libmysqlclient-dev # libmysqlclient-dev not disponible on Debian
- sudo apt install libmagickwand-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 curl
- sudo apt install nodejs
- sudo apt install redis
- sudo apt install imagemagick
- sudo apt install git
- ```
- ### 1.1. Database server
- MySQL is not available on the Debian default distribution, thus MariaDB can be installed instead[^2]:
- ```
- sudo apt install mariadb-server
- ```
- ### 1.2. Ruby install
- Example with rvm:
- ```
- curl -sSL https://rvm.io/mpapis.asc | gpg --import -
- curl -sSL https://rvm.io/pkuczynski.asc | gpg --import -
- curl -sSL https://get.rvm.io | bash -s stable
- ```
- If rvm installation is complete it will tells you which command to run in order to be able to use the `rvm` command. In the installation outputs sample below, this command is (you need to run this command in each new openend terminal):
- ```
- source /home/zetyty/.rvm/scripts/rvm
- ```
- <details>
- <summary>
- Installation outputs sample on Debian 12 (for user "zetyty"):
- </summary>
- ```
- ~$ curl -sSL https://get.rvm.io | bash -s stable
- Downloading https://github.com/rvm/rvm/archive/1.29.12.tar.gz
- Downloading https://github.com/rvm/rvm/releases/download/1.29.12/1.29.12.tar.gz.asc
- gpg: Signature made Fri 15 Jan 2021 07:46:22 PM CET
- gpg: using RSA key 7D2BAF1CF37B13E2069D6956105BD0E739499BDB
- gpg: Good signature from "Piotr Kuczynski <[email protected]>" [unknown]
- gpg: WARNING: This key is not certified with a trusted signature!
- gpg: There is no indication that the signature belongs to the owner.
- Primary key fingerprint: 7D2B AF1C F37B 13E2 069D 6956 105B D0E7 3949 9BDB
GPG verified '/home/tyty/.rvm/archives/rvm-1.29.12.tgz'Installing RVM to /home/tyty/.rvm/Adding rvm PATH line to /home/tyty/.profile /home/tyty/.mkshrc /home/tyty/.bashrc /home/tyty/.zshrc.Adding rvm loading line to /home/tyty/.profile /home/tyty/.bash_profile /home/tyty/.zlogin.Installation of RVM in /home/tyty/.rvm/ is almost complete:* To start using RVM you need to run `source /home/tyty/.rvm/scripts/rvm`- in all your open shell windows, in rare cases you need to reopen all shell windows.
- Thanks for installing RVM 🙏
- Please consider donating to our open collective to help us maintain RVM.
- 👉 Donate: https://opencollective.com/rvm/donate
- ```
- </details>
- Then, install ruby:
- ```
- rvm install 3.1.2
- ```
- ## 2. QPixel
- Download and install QPixel:
- ```
- git clone https://github.com/codidact/qpixel
- cd qpixel
- bundle install
- ```
- <details>
- <summary>
- `bundle install` outputs sample on Debian 12 (QPixel install in `/home` directory):
- </summary>
- ```
- ~/qpixel$ bundle install
- Bundler 2.3.7 is running, but your lockfile was generated with 2.4.13. Installing Bundler 2.4.13 and restarting using that version.
- Fetching gem metadata from https://rubygems.org/.
- Fetching bundler 2.4.13
- Installing bundler 2.4.13
- Fetching gem metadata from https://rubygems.org/.........
- Using rake 13.0.6
- Fetching concurrent-ruby 1.1.10
- Installing concurrent-ruby 1.1.10
- Fetching i18n 1.12.0
- Installing i18n 1.12.0
- Fetching minitest 5.16.3
- Installing minitest 5.16.3
- Fetching tzinfo 2.0.5
- Installing tzinfo 2.0.5
- Fetching activesupport 7.0.4
- Installing activesupport 7.0.4
- Fetching builder 3.2.4
- Installing builder 3.2.4
- Fetching erubi 1.11.0
- Installing erubi 1.11.0
- Fetching racc 1.6.2
- Installing racc 1.6.2 with native extensions
- Fetching nokogiri 1.14.3 (x86_64-linux)
- Installing nokogiri 1.14.3 (x86_64-linux)
- Fetching rails-dom-testing 2.0.3
- Installing rails-dom-testing 2.0.3
- Fetching crass 1.0.6
- Installing crass 1.0.6
- Fetching loofah 2.19.1
- Installing loofah 2.19.1
- Fetching rails-html-sanitizer 1.4.4
- Installing rails-html-sanitizer 1.4.4
- Fetching actionview 7.0.4
- Installing actionview 7.0.4
- Fetching rack 2.2.6.4
- Installing rack 2.2.6.4
- Fetching rack-test 2.0.2
- Installing rack-test 2.0.2
- Fetching actionpack 7.0.4
- Installing actionpack 7.0.4
- Fetching nio4r 2.5.8
- Installing nio4r 2.5.8 with native extensions
- Fetching websocket-extensions 0.1.5
- Installing websocket-extensions 0.1.5
- Fetching websocket-driver 0.7.5
- Installing websocket-driver 0.7.5 with native extensions
- Fetching actioncable 7.0.4
- Installing actioncable 7.0.4
- Fetching globalid 1.0.1
- Installing globalid 1.0.1
- Fetching activejob 7.0.4
- Installing activejob 7.0.4
- Fetching activemodel 7.0.4
- Installing activemodel 7.0.4
- Fetching activerecord 7.0.4
- Installing activerecord 7.0.4
- Fetching marcel 1.0.2
- Installing marcel 1.0.2
- Fetching mini_mime 1.1.2
- Installing mini_mime 1.1.2
- Fetching activestorage 7.0.4
- Installing activestorage 7.0.4
- Fetching mail 2.7.1
- Installing mail 2.7.1
- Using digest 3.1.0
- Fetching timeout 0.3.0
- Installing timeout 0.3.0
- Fetching net-protocol 0.1.3
- Installing net-protocol 0.1.3
- Fetching strscan 3.0.4
- Installing strscan 3.0.4 with native extensions
- Using net-imap 0.2.3
- Using net-pop 0.1.1
- Using net-smtp 0.3.1
- Fetching actionmailbox 7.0.4
- Installing actionmailbox 7.0.4
- Fetching actionmailer 7.0.4
- Installing actionmailer 7.0.4
- Fetching actiontext 7.0.4
- Installing actiontext 7.0.4
- Fetching public_suffix 5.0.0
- Installing public_suffix 5.0.0
- Fetching addressable 2.8.1
- Installing addressable 2.8.1
- Fetching ast 2.4.2
- Installing ast 2.4.2
- Fetching awesome_print 1.9.2
- Installing awesome_print 1.9.2
- Fetching aws-eventstream 1.2.0
- Installing aws-eventstream 1.2.0
- Fetching aws-partitions 1.628.0
- Installing aws-partitions 1.628.0
- Fetching aws-sigv4 1.5.1
- Installing aws-sigv4 1.5.1
- Fetching jmespath 1.6.1
- Installing jmespath 1.6.1
- Fetching aws-sdk-core 3.145.0
- Installing aws-sdk-core 3.145.0
- Fetching aws-sdk-kms 1.58.0
- Installing aws-sdk-kms 1.58.0
- Fetching aws-sdk-s3 1.114.0
- Installing aws-sdk-s3 1.114.0
- Fetching mime-types-data 3.2022.0105
- Installing mime-types-data 3.2022.0105
- Fetching mime-types 3.4.1
- Installing mime-types 3.4.1
- Using rexml 3.2.5
- Fetching xml-simple 1.1.9
- Installing xml-simple 1.1.9
- Fetching aws-ses-v4 0.8.1
- Installing aws-ses-v4 0.8.1
- Fetching bcrypt 3.1.18
- Installing bcrypt 3.1.18 with native extensions
- Fetching bindex 0.8.1
- Installing bindex 0.8.1 with native extensions
- Using bundler 2.4.13
- Fetching byebug 11.1.3
- Installing byebug 11.1.3 with native extensions
- Using matrix 0.4.2
- Fetching regexp_parser 2.5.0
- Installing regexp_parser 2.5.0
- Fetching xpath 3.2.0
- Installing xpath 3.2.0
- Fetching capybara 3.38.0
- Installing capybara 3.38.0
- Fetching chartkick 4.2.1
- Installing chartkick 4.2.1
- Fetching chronic 0.10.2
- Installing chronic 0.10.2
- Fetching chunky_png 1.4.0
- Installing chunky_png 1.4.0
- Fetching coffee-script-source 1.12.2
- Installing coffee-script-source 1.12.2
- Fetching execjs 2.8.1
- Installing execjs 2.8.1
- Fetching coffee-script 2.4.1
- Installing coffee-script 2.4.1
- Fetching method_source 1.0.0
- Installing method_source 1.0.0
- Fetching thor 1.2.1
- Installing thor 1.2.1
- Fetching zeitwerk 2.6.0
- Installing zeitwerk 2.6.0
- Fetching railties 7.0.4
- Installing railties 7.0.4
- Fetching coffee-rails 5.0.0
- Installing coffee-rails 5.0.0
- Fetching commonmarker 0.23.9
- Installing commonmarker 0.23.9 with native extensions
- Fetching counter_culture 3.2.1
- Installing counter_culture 3.2.1
- Fetching json 2.6.2
- Installing json 2.6.2 with native extensions
- Fetching docile 1.4.0
- Installing docile 1.4.0
- Fetching simplecov-html 0.10.2
- Installing simplecov-html 0.10.2
- Fetching simplecov 0.16.1
- Installing simplecov 0.16.1
- Fetching sync 0.5.0
- Installing sync 0.5.0
- Fetching tins 1.31.1
- Installing tins 1.31.1
- Fetching term-ansicolor 1.7.1
- Installing term-ansicolor 1.7.1
- Fetching coveralls 0.8.23
- Installing coveralls 0.8.23
- Fetching css_parser 1.11.0
- Installing css_parser 1.11.0
- Fetching orm_adapter 0.5.0
- Installing orm_adapter 0.5.0
- Fetching responders 3.0.1
- Installing responders 3.0.1
- Fetching warden 1.2.9
- Installing warden 1.2.9
- Fetching devise 4.8.1
- Installing devise 4.8.1
- Fetching ruby-saml 1.14.0
- Installing ruby-saml 1.14.0
- Fetching devise_saml_authenticatable 1.9.0
- Installing devise_saml_authenticatable 1.9.0
- Fetching diffy 3.4.2
- Installing diffy 3.4.2
- Fetching e2mmap 0.1.0
- Installing e2mmap 0.1.0
- Fetching fastimage 2.2.6
- Installing fastimage 2.2.6
- Fetching ffi 1.15.5
- Installing ffi 1.15.5 with native extensions
- Fetching flamegraph 0.9.5
- Installing flamegraph 0.9.5
- Fetching groupdate 6.1.0
- Installing groupdate 6.1.0
- Fetching hashie 5.0.0
- Installing hashie 5.0.0
- Fetching htmlentities 4.3.4
- Installing htmlentities 4.3.4
- Fetching mini_magick 4.11.0
- Installing mini_magick 4.11.0
- Fetching ruby-vips 2.1.4
- Installing ruby-vips 2.1.4
- Fetching image_processing 1.12.2
- Installing image_processing 1.12.2
- Fetching jbuilder 2.11.5
- Installing jbuilder 2.11.5
- Fetching jquery-rails 4.5.0
- Installing jquery-rails 4.5.0
- Fetching launchy 2.5.0
- Installing launchy 2.5.0
- Fetching letter_opener 1.8.1
- Installing letter_opener 1.8.1
- Fetching letter_opener_web 2.0.0
- Installing letter_opener_web 2.0.0
- Fetching rb-fsevent 0.11.2
- Installing rb-fsevent 0.11.2
- Fetching rb-inotify 0.10.1
- Installing rb-inotify 0.10.1
- Fetching listen 3.7.1
- Installing listen 3.7.1
- Fetching memory_profiler 1.0.0
- Installing memory_profiler 1.0.0
- Fetching minitest-ci 3.4.0
- Installing minitest-ci 3.4.0
- Fetching mysql2 0.5.4
- Installing mysql2 0.5.4 with native extensions
- Fetching rack-protection 2.2.2
- Installing rack-protection 2.2.2
- Fetching omniauth 2.1.0
- Installing omniauth 2.1.0
- Fetching parallel 1.22.1
- Installing parallel 1.22.1
- Fetching parser 3.1.2.1
- Installing parser 3.1.2.1
- Fetching pkg-config 1.5.1
- Installing pkg-config 1.5.1
- Fetching premailer 1.16.0
- Installing premailer 1.16.0
- Fetching premailer-rails 1.11.1
- Installing premailer-rails 1.11.1
- Fetching puma 5.6.5
- Installing puma 5.6.5 with native extensions
- Fetching rack-mini-profiler 3.0.0
- Installing rack-mini-profiler 3.0.0
- Fetching rails 7.0.4
- Installing rails 7.0.4
- Fetching rails-controller-testing 1.0.5
- Installing rails-controller-testing 1.0.5
- Fetching rainbow 3.1.1
- Installing rainbow 3.1.1
- Fetching redis 4.8.0
- Installing redis 4.8.0
- Fetching reverse_markdown 2.1.1
- Installing reverse_markdown 2.1.1
- Fetching rmagick 5.2.0
- Installing rmagick 5.2.0 with native extensions
- Fetching rotp 6.2.0
- Installing rotp 6.2.0
- Fetching rqrcode_core 1.2.0
- Installing rqrcode_core 1.2.0
- Fetching rqrcode 2.1.2
- Installing rqrcode 2.1.2
- Fetching rubocop-ast 1.21.0
- Installing rubocop-ast 1.21.0
- Fetching ruby-progressbar 1.11.0
- Installing ruby-progressbar 1.11.0
- Fetching unicode-display_width 2.2.0
- Installing unicode-display_width 2.2.0
- Fetching rubocop 1.36.0
- Installing rubocop 1.36.0
- Fetching rubocop-rails 2.16.0
- Installing rubocop-rails 2.16.0
- Fetching rubyzip 2.3.2
- Installing rubyzip 2.3.2
- Fetching sassc 2.4.0
- Installing sassc 2.4.0 with native extensions
- Fetching sprockets 4.1.1
- Installing sprockets 4.1.1
- Fetching sprockets-rails 3.4.2
- Installing sprockets-rails 3.4.2
- Fetching tilt 2.0.11
- Installing tilt 2.0.11
- Fetching sassc-rails 2.1.2
- Installing sassc-rails 2.1.2
- Fetching sass-rails 6.0.0
- Installing sass-rails 6.0.0
- Fetching websocket 1.2.9
- Installing websocket 1.2.9
- Fetching selenium-webdriver 4.7.1
- Installing selenium-webdriver 4.7.1
- Fetching spring 4.0.0
- Installing spring 4.0.0
- Fetching stackprof 0.2.21
- Installing stackprof 0.2.21 with native extensions
- Fetching stripe 5.55.0
- Installing stripe 5.55.0
- Fetching terser 1.1.12
- Installing terser 1.1.12
- Fetching thwait 0.2.0
- Installing thwait 0.2.0
- Fetching tzinfo-data 1.2022.3
- Installing tzinfo-data 1.2022.3
- Fetching web-console 4.2.0
- Installing web-console 4.2.0
- Fetching webdrivers 5.2.0
- Installing webdrivers 5.2.0
- Fetching whenever 1.0.0
- Installing whenever 1.0.0
- Fetching will_paginate 3.3.1
- Installing will_paginate 3.3.1
- Fetching will_paginate-bootstrap 1.0.2
- Installing will_paginate-bootstrap 1.0.2
- Bundle complete! 58 Gemfile dependencies, 157 gems now installed.
- Use `bundle info [gemname]` to see where a bundled gem is installed.
- ```
- </details>
- If the bundle install failed because of some kind of "PermissionError", you may have several ruby installs on your system and then you can take a look at [this post](https://collab.codidact.org/posts/288973).
- ## 3. Start MariaDB and redis servers
- Run:
- ```
- sudo systemctl start mariadb
- ```
**On WSL** we can't use `systemctl` but `service` instead (see [this answer](https://linux.codidact.com/posts/288812/288823#answer-288823)), it is also necessary to **stop the execution of a MySQL/MariaDB server on the Windows Host and on other running WSL** (because this prevents the server from being launched on the WSL... - on command prompt do `net stop MySQL80`):- ```
- sudo service mariadb start
- ```
- And don't forgot redis:
- ```
- sudo service redis-server start
- ```
- ## 4. Final steps
- At this point, you can follow the workflow described in [this answer](https://collab.codidact.org/posts/280451/280452#answer-280452) (starting with new database user creation and generation of `config/database.yml` and `config/storage.yml`).
**But, with MariaDB**, "you will need to replace all occurrences of `utf8mb4_0900_ai_ci` with `utf8mb4_unicode_ci` in `db/schema.rb`" [[cited from the GitHub installation Guide](https://github.com/codidact/qpixel/blob/develop/INSTALLATION.md)] (4 occurrences).- NB: if you stop your system before the `rails s` "big moment", be sure you have `redis-server` running (you can do `sudo service redis-server restart`). Same comment for `mariadb-server`.
- [^1]: I was not able to run QPixel on Debian WSL1 because I was not able to run the rails console (but I got no problem with WSL2). Also the install is significantly faster with WSL2.
[^2]: If you really want to install MySQL, you can take a look at [this discussion](https://linux.codidact.com/posts/288849), [this answer regarding Dockerized instance of MySQL on WSL or directly on the Windows Host](https://linux.codidact.com/posts/288812/288970#answer-288970) and [this official workflow](https://dev.mysql.com/doc/mysql-installation-excerpt/8.0/en/linux-installation-debian.html))
- # Debian-based (including on WSL)
- Required time: less than 1 hour.
- This workflow was tested on
- :
- - **Debian 12** (fresh install with [debian-12.0.0-amd64-netinst.iso](https://cdimage.debian.org/debian-cd/current/amd64/iso-cd/) on Virtual Box 7.0.8 and Windows 11 22H2 host)
- - **Debian 11 on WSL2** (Windows Subsystem Linux Version 2)[^1] (on Windows 11 22H2 host).
- - **Ubuntu 22.04.2 LTS on WSL2** (on Windows 11 22H2 host).
- ## 1. Prerequisites
- ```
- sudo apt update
- sudo apt install gcc
- sudo apt install make
- sudo apt install default-libmysqlclient-dev # libmysqlclient-dev not disponible on Debian
- sudo apt install libmagickwand-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 curl
- sudo apt install nodejs
- sudo apt install redis
- sudo apt install imagemagick
- sudo apt install git
- ```
- ### 1.1. Database server
- MySQL is not available on the Debian default distribution, thus MariaDB can be installed instead[^2]:
- ```
- sudo apt install mariadb-server
- ```
- ### 1.2. Ruby install
- Example with rvm:
- ```
- curl -sSL https://rvm.io/mpapis.asc | gpg --import -
- curl -sSL https://rvm.io/pkuczynski.asc | gpg --import -
- curl -sSL https://get.rvm.io | bash -s stable
- ```
- If rvm installation is complete it will tells you which command to run in order to be able to use the `rvm` command. In the installation outputs sample below, this command is (you need to run this command in each new openend terminal):
- ```
- source /home/zetyty/.rvm/scripts/rvm
- ```
- <details>
- <summary>
- Installation outputs sample on Debian 12 (for user "zetyty"):
- </summary>
- ```
- ~$ curl -sSL https://get.rvm.io | bash -s stable
- Downloading https://github.com/rvm/rvm/archive/1.29.12.tar.gz
- Downloading https://github.com/rvm/rvm/releases/download/1.29.12/1.29.12.tar.gz.asc
- gpg: Signature made Fri 15 Jan 2021 07:46:22 PM CET
- gpg: using RSA key 7D2BAF1CF37B13E2069D6956105BD0E739499BDB
- gpg: Good signature from "Piotr Kuczynski <[email protected]>" [unknown]
- gpg: WARNING: This key is not certified with a trusted signature!
- gpg: There is no indication that the signature belongs to the owner.
- Primary key fingerprint: 7D2B AF1C F37B 13E2 069D 6956 105B D0E7 3949 9BDB
- GPG verified '/home/zetyty/.rvm/archives/rvm-1.29.12.tgz'
- Installing RVM to /home/zetyty/.rvm/
- Adding rvm PATH line to /home/zetyty/.profile /home/zetyty/.mkshrc /home/zetyty/.bashrc /home/zetyty/.zshrc.
- Adding rvm loading line to /home/zetyty/.profile /home/zetyty/.bash_profile /home/zetyty/.zlogin.
- Installation of RVM in /home/zetyty/.rvm/ is almost complete:
- * To start using RVM you need to run `source /home/zetyty/.rvm/scripts/rvm`
- in all your open shell windows, in rare cases you need to reopen all shell windows.
- Thanks for installing RVM 🙏
- Please consider donating to our open collective to help us maintain RVM.
- 👉 Donate: https://opencollective.com/rvm/donate
- ```
- </details>
- Then, install ruby:
- ```
- rvm install 3.1.2
- ```
- ## 2. QPixel
- Download and install QPixel:
- ```
- git clone https://github.com/codidact/qpixel
- cd qpixel
- bundle install
- ```
- <details>
- <summary>
- `bundle install` outputs sample on Debian 12 (QPixel install in `/home` directory):
- </summary>
- ```
- ~/qpixel$ bundle install
- Bundler 2.3.7 is running, but your lockfile was generated with 2.4.13. Installing Bundler 2.4.13 and restarting using that version.
- Fetching gem metadata from https://rubygems.org/.
- Fetching bundler 2.4.13
- Installing bundler 2.4.13
- Fetching gem metadata from https://rubygems.org/.........
- Using rake 13.0.6
- Fetching concurrent-ruby 1.1.10
- Installing concurrent-ruby 1.1.10
- Fetching i18n 1.12.0
- Installing i18n 1.12.0
- Fetching minitest 5.16.3
- Installing minitest 5.16.3
- Fetching tzinfo 2.0.5
- Installing tzinfo 2.0.5
- Fetching activesupport 7.0.4
- Installing activesupport 7.0.4
- Fetching builder 3.2.4
- Installing builder 3.2.4
- Fetching erubi 1.11.0
- Installing erubi 1.11.0
- Fetching racc 1.6.2
- Installing racc 1.6.2 with native extensions
- Fetching nokogiri 1.14.3 (x86_64-linux)
- Installing nokogiri 1.14.3 (x86_64-linux)
- Fetching rails-dom-testing 2.0.3
- Installing rails-dom-testing 2.0.3
- Fetching crass 1.0.6
- Installing crass 1.0.6
- Fetching loofah 2.19.1
- Installing loofah 2.19.1
- Fetching rails-html-sanitizer 1.4.4
- Installing rails-html-sanitizer 1.4.4
- Fetching actionview 7.0.4
- Installing actionview 7.0.4
- Fetching rack 2.2.6.4
- Installing rack 2.2.6.4
- Fetching rack-test 2.0.2
- Installing rack-test 2.0.2
- Fetching actionpack 7.0.4
- Installing actionpack 7.0.4
- Fetching nio4r 2.5.8
- Installing nio4r 2.5.8 with native extensions
- Fetching websocket-extensions 0.1.5
- Installing websocket-extensions 0.1.5
- Fetching websocket-driver 0.7.5
- Installing websocket-driver 0.7.5 with native extensions
- Fetching actioncable 7.0.4
- Installing actioncable 7.0.4
- Fetching globalid 1.0.1
- Installing globalid 1.0.1
- Fetching activejob 7.0.4
- Installing activejob 7.0.4
- Fetching activemodel 7.0.4
- Installing activemodel 7.0.4
- Fetching activerecord 7.0.4
- Installing activerecord 7.0.4
- Fetching marcel 1.0.2
- Installing marcel 1.0.2
- Fetching mini_mime 1.1.2
- Installing mini_mime 1.1.2
- Fetching activestorage 7.0.4
- Installing activestorage 7.0.4
- Fetching mail 2.7.1
- Installing mail 2.7.1
- Using digest 3.1.0
- Fetching timeout 0.3.0
- Installing timeout 0.3.0
- Fetching net-protocol 0.1.3
- Installing net-protocol 0.1.3
- Fetching strscan 3.0.4
- Installing strscan 3.0.4 with native extensions
- Using net-imap 0.2.3
- Using net-pop 0.1.1
- Using net-smtp 0.3.1
- Fetching actionmailbox 7.0.4
- Installing actionmailbox 7.0.4
- Fetching actionmailer 7.0.4
- Installing actionmailer 7.0.4
- Fetching actiontext 7.0.4
- Installing actiontext 7.0.4
- Fetching public_suffix 5.0.0
- Installing public_suffix 5.0.0
- Fetching addressable 2.8.1
- Installing addressable 2.8.1
- Fetching ast 2.4.2
- Installing ast 2.4.2
- Fetching awesome_print 1.9.2
- Installing awesome_print 1.9.2
- Fetching aws-eventstream 1.2.0
- Installing aws-eventstream 1.2.0
- Fetching aws-partitions 1.628.0
- Installing aws-partitions 1.628.0
- Fetching aws-sigv4 1.5.1
- Installing aws-sigv4 1.5.1
- Fetching jmespath 1.6.1
- Installing jmespath 1.6.1
- Fetching aws-sdk-core 3.145.0
- Installing aws-sdk-core 3.145.0
- Fetching aws-sdk-kms 1.58.0
- Installing aws-sdk-kms 1.58.0
- Fetching aws-sdk-s3 1.114.0
- Installing aws-sdk-s3 1.114.0
- Fetching mime-types-data 3.2022.0105
- Installing mime-types-data 3.2022.0105
- Fetching mime-types 3.4.1
- Installing mime-types 3.4.1
- Using rexml 3.2.5
- Fetching xml-simple 1.1.9
- Installing xml-simple 1.1.9
- Fetching aws-ses-v4 0.8.1
- Installing aws-ses-v4 0.8.1
- Fetching bcrypt 3.1.18
- Installing bcrypt 3.1.18 with native extensions
- Fetching bindex 0.8.1
- Installing bindex 0.8.1 with native extensions
- Using bundler 2.4.13
- Fetching byebug 11.1.3
- Installing byebug 11.1.3 with native extensions
- Using matrix 0.4.2
- Fetching regexp_parser 2.5.0
- Installing regexp_parser 2.5.0
- Fetching xpath 3.2.0
- Installing xpath 3.2.0
- Fetching capybara 3.38.0
- Installing capybara 3.38.0
- Fetching chartkick 4.2.1
- Installing chartkick 4.2.1
- Fetching chronic 0.10.2
- Installing chronic 0.10.2
- Fetching chunky_png 1.4.0
- Installing chunky_png 1.4.0
- Fetching coffee-script-source 1.12.2
- Installing coffee-script-source 1.12.2
- Fetching execjs 2.8.1
- Installing execjs 2.8.1
- Fetching coffee-script 2.4.1
- Installing coffee-script 2.4.1
- Fetching method_source 1.0.0
- Installing method_source 1.0.0
- Fetching thor 1.2.1
- Installing thor 1.2.1
- Fetching zeitwerk 2.6.0
- Installing zeitwerk 2.6.0
- Fetching railties 7.0.4
- Installing railties 7.0.4
- Fetching coffee-rails 5.0.0
- Installing coffee-rails 5.0.0
- Fetching commonmarker 0.23.9
- Installing commonmarker 0.23.9 with native extensions
- Fetching counter_culture 3.2.1
- Installing counter_culture 3.2.1
- Fetching json 2.6.2
- Installing json 2.6.2 with native extensions
- Fetching docile 1.4.0
- Installing docile 1.4.0
- Fetching simplecov-html 0.10.2
- Installing simplecov-html 0.10.2
- Fetching simplecov 0.16.1
- Installing simplecov 0.16.1
- Fetching sync 0.5.0
- Installing sync 0.5.0
- Fetching tins 1.31.1
- Installing tins 1.31.1
- Fetching term-ansicolor 1.7.1
- Installing term-ansicolor 1.7.1
- Fetching coveralls 0.8.23
- Installing coveralls 0.8.23
- Fetching css_parser 1.11.0
- Installing css_parser 1.11.0
- Fetching orm_adapter 0.5.0
- Installing orm_adapter 0.5.0
- Fetching responders 3.0.1
- Installing responders 3.0.1
- Fetching warden 1.2.9
- Installing warden 1.2.9
- Fetching devise 4.8.1
- Installing devise 4.8.1
- Fetching ruby-saml 1.14.0
- Installing ruby-saml 1.14.0
- Fetching devise_saml_authenticatable 1.9.0
- Installing devise_saml_authenticatable 1.9.0
- Fetching diffy 3.4.2
- Installing diffy 3.4.2
- Fetching e2mmap 0.1.0
- Installing e2mmap 0.1.0
- Fetching fastimage 2.2.6
- Installing fastimage 2.2.6
- Fetching ffi 1.15.5
- Installing ffi 1.15.5 with native extensions
- Fetching flamegraph 0.9.5
- Installing flamegraph 0.9.5
- Fetching groupdate 6.1.0
- Installing groupdate 6.1.0
- Fetching hashie 5.0.0
- Installing hashie 5.0.0
- Fetching htmlentities 4.3.4
- Installing htmlentities 4.3.4
- Fetching mini_magick 4.11.0
- Installing mini_magick 4.11.0
- Fetching ruby-vips 2.1.4
- Installing ruby-vips 2.1.4
- Fetching image_processing 1.12.2
- Installing image_processing 1.12.2
- Fetching jbuilder 2.11.5
- Installing jbuilder 2.11.5
- Fetching jquery-rails 4.5.0
- Installing jquery-rails 4.5.0
- Fetching launchy 2.5.0
- Installing launchy 2.5.0
- Fetching letter_opener 1.8.1
- Installing letter_opener 1.8.1
- Fetching letter_opener_web 2.0.0
- Installing letter_opener_web 2.0.0
- Fetching rb-fsevent 0.11.2
- Installing rb-fsevent 0.11.2
- Fetching rb-inotify 0.10.1
- Installing rb-inotify 0.10.1
- Fetching listen 3.7.1
- Installing listen 3.7.1
- Fetching memory_profiler 1.0.0
- Installing memory_profiler 1.0.0
- Fetching minitest-ci 3.4.0
- Installing minitest-ci 3.4.0
- Fetching mysql2 0.5.4
- Installing mysql2 0.5.4 with native extensions
- Fetching rack-protection 2.2.2
- Installing rack-protection 2.2.2
- Fetching omniauth 2.1.0
- Installing omniauth 2.1.0
- Fetching parallel 1.22.1
- Installing parallel 1.22.1
- Fetching parser 3.1.2.1
- Installing parser 3.1.2.1
- Fetching pkg-config 1.5.1
- Installing pkg-config 1.5.1
- Fetching premailer 1.16.0
- Installing premailer 1.16.0
- Fetching premailer-rails 1.11.1
- Installing premailer-rails 1.11.1
- Fetching puma 5.6.5
- Installing puma 5.6.5 with native extensions
- Fetching rack-mini-profiler 3.0.0
- Installing rack-mini-profiler 3.0.0
- Fetching rails 7.0.4
- Installing rails 7.0.4
- Fetching rails-controller-testing 1.0.5
- Installing rails-controller-testing 1.0.5
- Fetching rainbow 3.1.1
- Installing rainbow 3.1.1
- Fetching redis 4.8.0
- Installing redis 4.8.0
- Fetching reverse_markdown 2.1.1
- Installing reverse_markdown 2.1.1
- Fetching rmagick 5.2.0
- Installing rmagick 5.2.0 with native extensions
- Fetching rotp 6.2.0
- Installing rotp 6.2.0
- Fetching rqrcode_core 1.2.0
- Installing rqrcode_core 1.2.0
- Fetching rqrcode 2.1.2
- Installing rqrcode 2.1.2
- Fetching rubocop-ast 1.21.0
- Installing rubocop-ast 1.21.0
- Fetching ruby-progressbar 1.11.0
- Installing ruby-progressbar 1.11.0
- Fetching unicode-display_width 2.2.0
- Installing unicode-display_width 2.2.0
- Fetching rubocop 1.36.0
- Installing rubocop 1.36.0
- Fetching rubocop-rails 2.16.0
- Installing rubocop-rails 2.16.0
- Fetching rubyzip 2.3.2
- Installing rubyzip 2.3.2
- Fetching sassc 2.4.0
- Installing sassc 2.4.0 with native extensions
- Fetching sprockets 4.1.1
- Installing sprockets 4.1.1
- Fetching sprockets-rails 3.4.2
- Installing sprockets-rails 3.4.2
- Fetching tilt 2.0.11
- Installing tilt 2.0.11
- Fetching sassc-rails 2.1.2
- Installing sassc-rails 2.1.2
- Fetching sass-rails 6.0.0
- Installing sass-rails 6.0.0
- Fetching websocket 1.2.9
- Installing websocket 1.2.9
- Fetching selenium-webdriver 4.7.1
- Installing selenium-webdriver 4.7.1
- Fetching spring 4.0.0
- Installing spring 4.0.0
- Fetching stackprof 0.2.21
- Installing stackprof 0.2.21 with native extensions
- Fetching stripe 5.55.0
- Installing stripe 5.55.0
- Fetching terser 1.1.12
- Installing terser 1.1.12
- Fetching thwait 0.2.0
- Installing thwait 0.2.0
- Fetching tzinfo-data 1.2022.3
- Installing tzinfo-data 1.2022.3
- Fetching web-console 4.2.0
- Installing web-console 4.2.0
- Fetching webdrivers 5.2.0
- Installing webdrivers 5.2.0
- Fetching whenever 1.0.0
- Installing whenever 1.0.0
- Fetching will_paginate 3.3.1
- Installing will_paginate 3.3.1
- Fetching will_paginate-bootstrap 1.0.2
- Installing will_paginate-bootstrap 1.0.2
- Bundle complete! 58 Gemfile dependencies, 157 gems now installed.
- Use `bundle info [gemname]` to see where a bundled gem is installed.
- ```
- </details>
- If the bundle install failed because of some kind of "PermissionError", you may have several ruby installs on your system and then you can take a look at [this post](https://collab.codidact.org/posts/288973).
- ## 3. Start MariaDB and redis servers
- Run:
- ```
- sudo systemctl start mariadb
- ```
- **On WSL** we can't use `systemctl` but `service` instead (see [this answer](https://linux.codidact.com/posts/288812/288823#answer-288823)), it is also necessary to **stop the execution of a MySQL/MariaDB server on the Windows Host and on other running WSL** (because this prevents the server from being launched on the current WSL)[^3]:
- ```
- sudo service mariadb start
- ```
- And don't forgot redis:
- ```
- sudo service redis-server start
- ```
- ## 4. Final steps
- At this point, you can follow the workflow described in [this answer](https://collab.codidact.org/posts/280451/280452#answer-280452) (starting with new database user creation and generation of `config/database.yml` and `config/storage.yml`).
- **But, with MariaDB**, "you will need to replace all occurrences of `utf8mb4_0900_ai_ci` with `utf8mb4_unicode_ci` in `db/schema.rb`" (4 occurrences) [[cited from the GitHub installation Guide](https://github.com/codidact/qpixel/blob/develop/INSTALLATION.md)].
- NB: if you stop your system before the `rails s` "big moment", be sure you have `redis-server` running (you can do `sudo service redis-server restart`). Same comment for `mariadb-server`.
- [^1]: I was not able to run QPixel on Debian WSL1 because I was not able to run the rails console (but I got no problem with WSL2). Also the install is significantly faster with WSL2.
- [^2]: If you really want to install MySQL, you can take a look at [this discussion](https://linux.codidact.com/posts/288849), [this answer regarding Dockerized instance of MySQL on WSL or directly on the Windows Host](https://linux.codidact.com/posts/288812/288970#answer-288970) and [this official workflow](https://dev.mysql.com/doc/mysql-installation-excerpt/8.0/en/linux-installation-debian.html)).
- [^3]: To stop MySQL on Windows: Open a on command prompt and run `net stop MySQL80`. On other running WSL, (i) you can stop MySQL/MariaDB server on other WSL or (ii) stop some running WSL by opening a PowerShell and run `wsl -t DISTRO-NAME` - you can find the list of all `DISTRO-NAME` installed and their status (running/stopped) with `wsl -l -v`.
#1: Initial revision
# Debian-based (desktop and WSL2) Required time: less than 1 hour. This workflow was tested on : - **Debian 12** (fresh install with [debian-12.0.0-amd64-netinst.iso](https://cdimage.debian.org/debian-cd/current/amd64/iso-cd/) on Virtual Box 7.0.8 and Windows 11 22H2 host) - **Debian 11 on WSL2** (Windows Subsystem Linux Version 2)[^1] (on Windows 11 22H2 host). - **Ubuntu 22.04.2 LTS on WSL2** (on Windows 11 22H2 host). ## 1. Prerequisites ``` sudo apt update sudo apt install gcc sudo apt install make sudo apt install default-libmysqlclient-dev # libmysqlclient-dev not disponible on Debian sudo apt install libmagickwand-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 curl sudo apt install nodejs sudo apt install redis sudo apt install imagemagick sudo apt install git ``` ### 1.1. Database server MySQL is not available on the Debian default distribution, thus MariaDB can be installed instead[^2]: ``` sudo apt install mariadb-server ``` ### 1.2. Ruby install Example with rvm: ``` curl -sSL https://rvm.io/mpapis.asc | gpg --import - curl -sSL https://rvm.io/pkuczynski.asc | gpg --import - curl -sSL https://get.rvm.io | bash -s stable ``` If rvm installation is complete it will tells you which command to run in order to be able to use the `rvm` command. In the installation outputs sample below, this command is (you need to run this command in each new openend terminal): ``` source /home/zetyty/.rvm/scripts/rvm ``` <details> <summary> Installation outputs sample on Debian 12 (for user "zetyty"): </summary> ``` ~$ curl -sSL https://get.rvm.io | bash -s stable Downloading https://github.com/rvm/rvm/archive/1.29.12.tar.gz Downloading https://github.com/rvm/rvm/releases/download/1.29.12/1.29.12.tar.gz.asc gpg: Signature made Fri 15 Jan 2021 07:46:22 PM CET gpg: using RSA key 7D2BAF1CF37B13E2069D6956105BD0E739499BDB gpg: Good signature from "Piotr Kuczynski <[email protected]>" [unknown] gpg: WARNING: This key is not certified with a trusted signature! gpg: There is no indication that the signature belongs to the owner. Primary key fingerprint: 7D2B AF1C F37B 13E2 069D 6956 105B D0E7 3949 9BDB GPG verified '/home/tyty/.rvm/archives/rvm-1.29.12.tgz' Installing RVM to /home/tyty/.rvm/ Adding rvm PATH line to /home/tyty/.profile /home/tyty/.mkshrc /home/tyty/.bashrc /home/tyty/.zshrc. Adding rvm loading line to /home/tyty/.profile /home/tyty/.bash_profile /home/tyty/.zlogin. Installation of RVM in /home/tyty/.rvm/ is almost complete: * To start using RVM you need to run `source /home/tyty/.rvm/scripts/rvm` in all your open shell windows, in rare cases you need to reopen all shell windows. Thanks for installing RVM 🙏 Please consider donating to our open collective to help us maintain RVM. 👉 Donate: https://opencollective.com/rvm/donate ``` </details> Then, install ruby: ``` rvm install 3.1.2 ``` ## 2. QPixel Download and install QPixel: ``` git clone https://github.com/codidact/qpixel cd qpixel bundle install ``` <details> <summary> `bundle install` outputs sample on Debian 12 (QPixel install in `/home` directory): </summary> ``` ~/qpixel$ bundle install Bundler 2.3.7 is running, but your lockfile was generated with 2.4.13. Installing Bundler 2.4.13 and restarting using that version. Fetching gem metadata from https://rubygems.org/. Fetching bundler 2.4.13 Installing bundler 2.4.13 Fetching gem metadata from https://rubygems.org/......... Using rake 13.0.6 Fetching concurrent-ruby 1.1.10 Installing concurrent-ruby 1.1.10 Fetching i18n 1.12.0 Installing i18n 1.12.0 Fetching minitest 5.16.3 Installing minitest 5.16.3 Fetching tzinfo 2.0.5 Installing tzinfo 2.0.5 Fetching activesupport 7.0.4 Installing activesupport 7.0.4 Fetching builder 3.2.4 Installing builder 3.2.4 Fetching erubi 1.11.0 Installing erubi 1.11.0 Fetching racc 1.6.2 Installing racc 1.6.2 with native extensions Fetching nokogiri 1.14.3 (x86_64-linux) Installing nokogiri 1.14.3 (x86_64-linux) Fetching rails-dom-testing 2.0.3 Installing rails-dom-testing 2.0.3 Fetching crass 1.0.6 Installing crass 1.0.6 Fetching loofah 2.19.1 Installing loofah 2.19.1 Fetching rails-html-sanitizer 1.4.4 Installing rails-html-sanitizer 1.4.4 Fetching actionview 7.0.4 Installing actionview 7.0.4 Fetching rack 2.2.6.4 Installing rack 2.2.6.4 Fetching rack-test 2.0.2 Installing rack-test 2.0.2 Fetching actionpack 7.0.4 Installing actionpack 7.0.4 Fetching nio4r 2.5.8 Installing nio4r 2.5.8 with native extensions Fetching websocket-extensions 0.1.5 Installing websocket-extensions 0.1.5 Fetching websocket-driver 0.7.5 Installing websocket-driver 0.7.5 with native extensions Fetching actioncable 7.0.4 Installing actioncable 7.0.4 Fetching globalid 1.0.1 Installing globalid 1.0.1 Fetching activejob 7.0.4 Installing activejob 7.0.4 Fetching activemodel 7.0.4 Installing activemodel 7.0.4 Fetching activerecord 7.0.4 Installing activerecord 7.0.4 Fetching marcel 1.0.2 Installing marcel 1.0.2 Fetching mini_mime 1.1.2 Installing mini_mime 1.1.2 Fetching activestorage 7.0.4 Installing activestorage 7.0.4 Fetching mail 2.7.1 Installing mail 2.7.1 Using digest 3.1.0 Fetching timeout 0.3.0 Installing timeout 0.3.0 Fetching net-protocol 0.1.3 Installing net-protocol 0.1.3 Fetching strscan 3.0.4 Installing strscan 3.0.4 with native extensions Using net-imap 0.2.3 Using net-pop 0.1.1 Using net-smtp 0.3.1 Fetching actionmailbox 7.0.4 Installing actionmailbox 7.0.4 Fetching actionmailer 7.0.4 Installing actionmailer 7.0.4 Fetching actiontext 7.0.4 Installing actiontext 7.0.4 Fetching public_suffix 5.0.0 Installing public_suffix 5.0.0 Fetching addressable 2.8.1 Installing addressable 2.8.1 Fetching ast 2.4.2 Installing ast 2.4.2 Fetching awesome_print 1.9.2 Installing awesome_print 1.9.2 Fetching aws-eventstream 1.2.0 Installing aws-eventstream 1.2.0 Fetching aws-partitions 1.628.0 Installing aws-partitions 1.628.0 Fetching aws-sigv4 1.5.1 Installing aws-sigv4 1.5.1 Fetching jmespath 1.6.1 Installing jmespath 1.6.1 Fetching aws-sdk-core 3.145.0 Installing aws-sdk-core 3.145.0 Fetching aws-sdk-kms 1.58.0 Installing aws-sdk-kms 1.58.0 Fetching aws-sdk-s3 1.114.0 Installing aws-sdk-s3 1.114.0 Fetching mime-types-data 3.2022.0105 Installing mime-types-data 3.2022.0105 Fetching mime-types 3.4.1 Installing mime-types 3.4.1 Using rexml 3.2.5 Fetching xml-simple 1.1.9 Installing xml-simple 1.1.9 Fetching aws-ses-v4 0.8.1 Installing aws-ses-v4 0.8.1 Fetching bcrypt 3.1.18 Installing bcrypt 3.1.18 with native extensions Fetching bindex 0.8.1 Installing bindex 0.8.1 with native extensions Using bundler 2.4.13 Fetching byebug 11.1.3 Installing byebug 11.1.3 with native extensions Using matrix 0.4.2 Fetching regexp_parser 2.5.0 Installing regexp_parser 2.5.0 Fetching xpath 3.2.0 Installing xpath 3.2.0 Fetching capybara 3.38.0 Installing capybara 3.38.0 Fetching chartkick 4.2.1 Installing chartkick 4.2.1 Fetching chronic 0.10.2 Installing chronic 0.10.2 Fetching chunky_png 1.4.0 Installing chunky_png 1.4.0 Fetching coffee-script-source 1.12.2 Installing coffee-script-source 1.12.2 Fetching execjs 2.8.1 Installing execjs 2.8.1 Fetching coffee-script 2.4.1 Installing coffee-script 2.4.1 Fetching method_source 1.0.0 Installing method_source 1.0.0 Fetching thor 1.2.1 Installing thor 1.2.1 Fetching zeitwerk 2.6.0 Installing zeitwerk 2.6.0 Fetching railties 7.0.4 Installing railties 7.0.4 Fetching coffee-rails 5.0.0 Installing coffee-rails 5.0.0 Fetching commonmarker 0.23.9 Installing commonmarker 0.23.9 with native extensions Fetching counter_culture 3.2.1 Installing counter_culture 3.2.1 Fetching json 2.6.2 Installing json 2.6.2 with native extensions Fetching docile 1.4.0 Installing docile 1.4.0 Fetching simplecov-html 0.10.2 Installing simplecov-html 0.10.2 Fetching simplecov 0.16.1 Installing simplecov 0.16.1 Fetching sync 0.5.0 Installing sync 0.5.0 Fetching tins 1.31.1 Installing tins 1.31.1 Fetching term-ansicolor 1.7.1 Installing term-ansicolor 1.7.1 Fetching coveralls 0.8.23 Installing coveralls 0.8.23 Fetching css_parser 1.11.0 Installing css_parser 1.11.0 Fetching orm_adapter 0.5.0 Installing orm_adapter 0.5.0 Fetching responders 3.0.1 Installing responders 3.0.1 Fetching warden 1.2.9 Installing warden 1.2.9 Fetching devise 4.8.1 Installing devise 4.8.1 Fetching ruby-saml 1.14.0 Installing ruby-saml 1.14.0 Fetching devise_saml_authenticatable 1.9.0 Installing devise_saml_authenticatable 1.9.0 Fetching diffy 3.4.2 Installing diffy 3.4.2 Fetching e2mmap 0.1.0 Installing e2mmap 0.1.0 Fetching fastimage 2.2.6 Installing fastimage 2.2.6 Fetching ffi 1.15.5 Installing ffi 1.15.5 with native extensions Fetching flamegraph 0.9.5 Installing flamegraph 0.9.5 Fetching groupdate 6.1.0 Installing groupdate 6.1.0 Fetching hashie 5.0.0 Installing hashie 5.0.0 Fetching htmlentities 4.3.4 Installing htmlentities 4.3.4 Fetching mini_magick 4.11.0 Installing mini_magick 4.11.0 Fetching ruby-vips 2.1.4 Installing ruby-vips 2.1.4 Fetching image_processing 1.12.2 Installing image_processing 1.12.2 Fetching jbuilder 2.11.5 Installing jbuilder 2.11.5 Fetching jquery-rails 4.5.0 Installing jquery-rails 4.5.0 Fetching launchy 2.5.0 Installing launchy 2.5.0 Fetching letter_opener 1.8.1 Installing letter_opener 1.8.1 Fetching letter_opener_web 2.0.0 Installing letter_opener_web 2.0.0 Fetching rb-fsevent 0.11.2 Installing rb-fsevent 0.11.2 Fetching rb-inotify 0.10.1 Installing rb-inotify 0.10.1 Fetching listen 3.7.1 Installing listen 3.7.1 Fetching memory_profiler 1.0.0 Installing memory_profiler 1.0.0 Fetching minitest-ci 3.4.0 Installing minitest-ci 3.4.0 Fetching mysql2 0.5.4 Installing mysql2 0.5.4 with native extensions Fetching rack-protection 2.2.2 Installing rack-protection 2.2.2 Fetching omniauth 2.1.0 Installing omniauth 2.1.0 Fetching parallel 1.22.1 Installing parallel 1.22.1 Fetching parser 3.1.2.1 Installing parser 3.1.2.1 Fetching pkg-config 1.5.1 Installing pkg-config 1.5.1 Fetching premailer 1.16.0 Installing premailer 1.16.0 Fetching premailer-rails 1.11.1 Installing premailer-rails 1.11.1 Fetching puma 5.6.5 Installing puma 5.6.5 with native extensions Fetching rack-mini-profiler 3.0.0 Installing rack-mini-profiler 3.0.0 Fetching rails 7.0.4 Installing rails 7.0.4 Fetching rails-controller-testing 1.0.5 Installing rails-controller-testing 1.0.5 Fetching rainbow 3.1.1 Installing rainbow 3.1.1 Fetching redis 4.8.0 Installing redis 4.8.0 Fetching reverse_markdown 2.1.1 Installing reverse_markdown 2.1.1 Fetching rmagick 5.2.0 Installing rmagick 5.2.0 with native extensions Fetching rotp 6.2.0 Installing rotp 6.2.0 Fetching rqrcode_core 1.2.0 Installing rqrcode_core 1.2.0 Fetching rqrcode 2.1.2 Installing rqrcode 2.1.2 Fetching rubocop-ast 1.21.0 Installing rubocop-ast 1.21.0 Fetching ruby-progressbar 1.11.0 Installing ruby-progressbar 1.11.0 Fetching unicode-display_width 2.2.0 Installing unicode-display_width 2.2.0 Fetching rubocop 1.36.0 Installing rubocop 1.36.0 Fetching rubocop-rails 2.16.0 Installing rubocop-rails 2.16.0 Fetching rubyzip 2.3.2 Installing rubyzip 2.3.2 Fetching sassc 2.4.0 Installing sassc 2.4.0 with native extensions Fetching sprockets 4.1.1 Installing sprockets 4.1.1 Fetching sprockets-rails 3.4.2 Installing sprockets-rails 3.4.2 Fetching tilt 2.0.11 Installing tilt 2.0.11 Fetching sassc-rails 2.1.2 Installing sassc-rails 2.1.2 Fetching sass-rails 6.0.0 Installing sass-rails 6.0.0 Fetching websocket 1.2.9 Installing websocket 1.2.9 Fetching selenium-webdriver 4.7.1 Installing selenium-webdriver 4.7.1 Fetching spring 4.0.0 Installing spring 4.0.0 Fetching stackprof 0.2.21 Installing stackprof 0.2.21 with native extensions Fetching stripe 5.55.0 Installing stripe 5.55.0 Fetching terser 1.1.12 Installing terser 1.1.12 Fetching thwait 0.2.0 Installing thwait 0.2.0 Fetching tzinfo-data 1.2022.3 Installing tzinfo-data 1.2022.3 Fetching web-console 4.2.0 Installing web-console 4.2.0 Fetching webdrivers 5.2.0 Installing webdrivers 5.2.0 Fetching whenever 1.0.0 Installing whenever 1.0.0 Fetching will_paginate 3.3.1 Installing will_paginate 3.3.1 Fetching will_paginate-bootstrap 1.0.2 Installing will_paginate-bootstrap 1.0.2 Bundle complete! 58 Gemfile dependencies, 157 gems now installed. Use `bundle info [gemname]` to see where a bundled gem is installed. ``` </details> If the bundle install failed because of some kind of "PermissionError", you may have several ruby installs on your system and then you can take a look at [this post](https://collab.codidact.org/posts/288973). ## 3. Start MariaDB and redis servers Run: ``` sudo systemctl start mariadb ``` **On WSL** we can't use `systemctl` but `service` instead (see [this answer](https://linux.codidact.com/posts/288812/288823#answer-288823)), it is also necessary to **stop the execution of a MySQL/MariaDB server on the Windows Host and on other running WSL** (because this prevents the server from being launched on the WSL... - on command prompt do `net stop MySQL80`): ``` sudo service mariadb start ``` And don't forgot redis: ``` sudo service redis-server start ``` ## 4. Final steps At this point, you can follow the workflow described in [this answer](https://collab.codidact.org/posts/280451/280452#answer-280452) (starting with new database user creation and generation of `config/database.yml` and `config/storage.yml`). **But, with MariaDB**, "you will need to replace all occurrences of `utf8mb4_0900_ai_ci` with `utf8mb4_unicode_ci` in `db/schema.rb`" [[cited from the GitHub installation Guide](https://github.com/codidact/qpixel/blob/develop/INSTALLATION.md)] (4 occurrences). NB: if you stop your system before the `rails s` "big moment", be sure you have `redis-server` running (you can do `sudo service redis-server restart`). Same comment for `mariadb-server`. [^1]: I was not able to run QPixel on Debian WSL1 because I was not able to run the rails console (but I got no problem with WSL2). Also the install is significantly faster with WSL2. [^2]: If you really want to install MySQL, you can take a look at [this discussion](https://linux.codidact.com/posts/288849), [this answer regarding Dockerized instance of MySQL on WSL or directly on the Windows Host](https://linux.codidact.com/posts/288812/288970#answer-288970) and [this official workflow](https://dev.mysql.com/doc/mysql-installation-excerpt/8.0/en/linux-installation-debian.html))