Koki's personal blog

Koki's personal blog

Another fine, responsive site template by HTML5 UP.

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.

Koki

1-Minute Read

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

  • 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

Recent Posts

See More

categories

About