Install ruby serial port in WSL environment

When I tried to use the serial port gem with WSL on Windows, I was addicted to it, so I made a note.

Unable to compile when trying to install serialport gem.

environment Windows 10 WSL Ubuntu 20.04 LTS

Update for the time being sudo apt update

ruby-dev and build-essential seem to be needed for serialport build sudo apt install -y ruby ruby-dev build-essential

serialport installation sudo gem install serialport

You have successfully installed it.

Recommended Posts

Install ruby serial port in WSL environment
Update Ruby in Unicorn environment
Install / run a standalone robot simulator in wsl2 / docker environment!
How to install Bootstrap in Ruby
Just install Laravel8 on docker in PHP8 environment
How to install Titan2D (v4.2.0) in virtual environment
Heavy in Ruby! ??
[Beginner] Install java development tool in cloud9 development environment.
[Stable] Install openjdk-8-jdk safely in Raspbian Buster (Debian 10) environment
Dramatically speed up slow bundle install in docker environment
Command memo to install xeyes in ubuntu docker environment
Install Ruby on Ubuntu 20.04
Output triangle in Ruby
Variable type in ruby
Fast popcount in Ruby
Difficulties in building a Ruby on Rails environment (Windows 10) (SQLite3)
Install by specifying the version of Django in the Docker environment