Windows10 + WSL2 + Ubuntu。
sudo apt-get update -qq
sudo apt-get -y install apt-transport-https ca-certificates curl software-properties-common
curl -fsSL https://mirrors.aliyun.com/docker-ce/linux/ubuntu/gpg | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] https://mirrors.aliyun.com/docker-ce/linux/ubuntu $(lsb_release -cs) stable"
sudo apt-get update -yqq && apt-get install -y python3-pip libsqlite3-dev imagemagick mupdf-tools --fix-missing
sudo apt-get install -y gcc g++ make
sudo curl -sL https://deb.nodesource.com/setup_14.x | bash -
sudo apt-get install -y nodejs
sudo apt-get install -y git
bash -c "$(curl -fsSL https://gitee.com/RubyKids/rbenv-cn/raw/master/install.sh)"
# 使用 Ruby China 的镜像安装 Ruby, 国内用户推荐
git clone git://github.com/AndorChen/rbenv-china-mirror.git ~/.rbenv/plugins/rbenv-china-mirror
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bashrc
echo 'eval "$(rbenv init -)"' >> ~/.bashrc
sudo apt-get install -y libssl-dev libreadline-dev zlib1g-dev && apt-get autoremove
rbenv install 2.6.6 && rbenv global 2.6.6
gem sources --add https://gems.ruby-china.com/ --remove https://rubygems.org/
gem install bundler:2.2.22
gem install rails:6.1.4