Having a locally installed Exercism website may be useful for us to nut out directly submitting from Pharo, but I've had a few difficulties with that. Opened this issue as a place to keep notes, away from other issues.
TL;DR... Installing Exercise website on Ubuntu under Windows Subsystem For Linux
may be blocked by microsoft/WSL#3100 "socketpair() syscall ignores non-blocking request (SOCK_NONBLOCK, O_NONBLOCK) "
I didn't keep an exact log as I went, but the following is pieced together from bash history...
System platform
$ cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=16.04
DISTRIB_CODENAME=xenial
DISTRIB_DESCRIPTION="Ubuntu 16.04.5 LTS"
$ uname -a
Linux BENGINEER 4.4.0-17134-Microsoft #137-Microsoft Thu Jun 14 18:46:00 PST 2018 x86_64 x86_64 x86_64 GNU/Linux
Updated system and installed required system packages
$ sudo apt-get update && sudo apt-get upgrade
$ sudo apt-get install yarn mysql-server mysql-client libmysqlclient-dev cmake
$ yarn --version
1.9.4
$ mysql --version
mysql Ver 14.14 Distrib 5.7.23, for Linux (x86_64) using EditLine wrapper
$ cmake --version
cmake version 3.5.1
Installed Ruby via Ruby Version Manager per http://rvm.io/
$ gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB
$ \curl -sSL https://get.rvm.io | bash -s stable
$ rvm --version
rvm 1.29.4 (latest) by Michal Papis, Piotr Kuczynski, Wayne E. Seguin [https://rvm.io]
$ rvm use 2.4 --default
Using /home/ben/.rvm/gems/ruby-2.4.4
$ ruby --version
ruby 2.4.4p296 (2018-03-28 revision 63013) [x86_64-linux]
$ gem install bundler
$ bundler --version
Bundler version 1.16.4
Configured database
$ sudo /etc/init.d/mysql start
$ mysql -u root -p
CREATE USER 'exercism_reboot'@'localhost' IDENTIFIED BY 'exercism_reboot';
CREATE DATABASE exercism_reboot_test;
CREATE DATABASE exercism_reboot_development;
ALTER DATABASE exercism_reboot_test CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
ALTER DATABASE exercism_reboot_development CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
GRANT ALL PRIVILEGES ON exercism_reboot_test.* TO 'exercism_reboot'@'localhost';
GRANT ALL PRIVILEGES ON exercism_reboot_development.* TO 'exercism_reboot'@'localhost';
Cloned website and install bundle
$ mkdir -p Repos/Exercism && cd Repos/Exercism
$ git clone [email protected]:exercism/website.git
$ cd website
$ echo "myhost" > server_identity
$ bundle install
$ bundle exec rake exercism:setup
$ bundle exec rails server
In web browser, opened http://lvh:3000 and up popped Exercism web site (yay! the crowd cheered!),
but its empty of tracks (augh... the crowd was disappointed...)
Poke around blindly
At the risk of breaking things (since I haven't used ruby/rails before)...
$ bundle exec rake -T # list of available tasks
$ bundle exec rake db:drop
Dropped database 'exercism_reboot_development'
Dropped database 'exercism_reboot_test'
$ bundle exec rake db:create
Created database 'exercism_reboot_development'
Created database 'exercism_reboot_test'
$ bundle exec rake --trace exercism:setup
All the create_table() and add_foreign_key() succeeded. Here is the log carrying on from the last one...
-- add_foreign_key("user_tracks", "users")
-> 0.1765s
** Invoke db:seed (first_time)
** Execute db:seed
** Invoke db:abort_if_pending_migrations (first_time)
** Invoke db:load_config
** Execute db:abort_if_pending_migrations
rake aborted!
IO::EINPROGRESSWaitWritable: Operation now in progress - connect(2) would block
/home/ben/.rvm/rubies/ruby-2.4.4/lib/ruby/2.4.0/socket.rb:1198:in __connect_nonblock' /home/ben/.rvm/rubies/ruby-2.4.4/lib/ruby/2.4.0/socket.rb:1198:in
connect_nonblock'
/home/ben/.rvm/gems/ruby-2.4.4/gems/redis-4.0.1/lib/redis/connection/ruby.rb:187:in rescue in connect_addrinfo' /home/ben/.rvm/gems/ruby-2.4.4/gems/redis-4.0.1/lib/redis/connection/ruby.rb:179:in
connect_addrinfo'
P.S. I wonder what is the best way for wipe the slate clean for another try.