DEV Community

Clever Lopes
Clever Lopes

Posted on

Installing Ruby and Rails on WSL2 using ASDF-VM

In this short tutorial i'm using ubuntu 22.04lts on WSL2

Pre-reqs

You need the asdf-vm and the dev packages installed.

Getting Started

Install the ruby plugin

asdf plugin add ruby
Enter fullscreen mode Exit fullscreen mode

Install the version

asdf install ruby x.x.x
Enter fullscreen mode Exit fullscreen mode

Set the global version

asdf global ruby x.x.x
Enter fullscreen mode Exit fullscreen mode

Install the bundler and rails

gem install bundler
Enter fullscreen mode Exit fullscreen mode
gem install rails
Enter fullscreen mode Exit fullscreen mode

To set up your rails development env you can see this post

Obs:

If you have some problem in install the ruby version using asdf make sure the following packages are installed: libyaml-dev libtool zlib1g zlib1g-dev libffi

Top comments (0)