DEV Community

bluepaperbirds
bluepaperbirds

Posted on

Ruby on OpenBSD

If you use OpenBSD for security reasons, you can use several versions of Ruby. OpenBSD is a unix system that has many built-in security mitigations.

Install Ruby

You can use the command pkg_info to get information on packages

doas pkg_info -Q ruby
Enter fullscreen mode Exit fullscreen mode

This returns all related ruby packages. On the latest OpenBSD version. To check your OpenBSD version

$ uname -a
OpenBSD foo.home 6.8 GENERIC.MP#2 amd64
Enter fullscreen mode Exit fullscreen mode

In my version it returns

jruby-9.2.13.0
mruby-2.0.1p0
ruby-2.5.8p0
ruby-2.6.6p0
ruby-2.7.1p1
Enter fullscreen mode Exit fullscreen mode

This is the default OpenBSD packages, not the ports repository. In the ports repository, they didn't do a security audit on the software packages.

You can install ruby with the command

doas pkg_add ruby-2.7.1p1
Enter fullscreen mode Exit fullscreen mode

If you are new to Ruby, try this Ruby tutorial.

Then to run program you can use ruby27.

ruby27 program.rb
Enter fullscreen mode Exit fullscreen mode

Of course Ruby isn't the only programming language you can use on Go. There's C, C++, Golang, Python, PHP and a lot more.

Top comments (0)