How to build an environment of Ruby on Rails tutorial on WSL
Explain how to build a environment of Ruby on Rails tutorial on WSL.
This article explains how to build the environment of Ruby on Rails tutorial on WSL.
The following lists are the table of contents about this article.
- Target audience
- Environment
- Preconditions
- Building the environment of Ruby on Rails tutorial
- Reference articles
Target audience
- Those who want to build the environment of Ruby on Rails tutorial on WSL.
Environment
- Windows 10 (1903)
- Ubuntu (Distribution of WSL, have to use without version.)
Preconditions
- Enable the function of WSL
- Installed Ubuntu (WSL)
Building the environment of Ruby on Rails tutorial
Execute the following commands.
That’s it!
# Install necessary tools
sudo apt update
sudo apt upgrade -y
sudo apt install autoconf bison build-essential libssl1.0-dev libyaml-dev libreadline-dev zlib1g-dev libncurses5-dev libffi-dev libgdbm-dev sqlite3 libsqlite3-dev nodejs-dev node-gyp npm git -y
sudo npm install --global yarn
# Install rbenv
git clone https://github.com/rbenv/rbenv.git ~/.rbenv
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bashrc
echo 'eval "$(rbenv init -)"' >> ~/.bashrc
source ~/.bashrc
# Install ruby-build
git clone https://github.com/rbenv/ruby-build.git "$(rbenv root)"/plugins/ruby-build
# Install Ruby
rbenv install 2.6.5
rbenv global 2.6.5
# Install Ruby on Rails
gem install rails -v 5.1.6 --no-document
Reference articles
xxxxxxxxxx
xxxxxxxxxx