DEV Community

olistik
olistik

Posted on

1

Compiling Ruby 3.3 on OpenBSD 7.4

Resuming the work done for

https://dev.to/olistik/a-naive-installation-of-ruby-and-rails-on-openbsd-4d50

I wanted to test the latest Ruby 3.3.0 on the latest OpenBSD 7.4 and here are the results.

First of all, let's download the sources:

$ curl -LO https://cache.ruby-lang.org/pub/ruby/3.3/ruby-3.3.0.tar.gz
$ tar xvfz ruby-3.3.0.tar.gz
$ cd ruby-3.3.0
Enter fullscreen mode Exit fullscreen mode

Add libyaml dependency if you don't have it already:

$ doas pkg_add libyaml
Enter fullscreen mode Exit fullscreen mode

Configure the compilation so that it picks libyaml and it outputs the binaries in our rubies directory:

$ CONFIGURE_ARGS="--with-libyaml-dir=/usr/local/lib" ./configure  --prefix ~/.rubies/3.3.0
$ make
$ make install
Enter fullscreen mode Exit fullscreen mode

Update the symlink for the current version:

$ cd $HOME/rubies
$ rm current
$ ln -s /home/$HOME/.rubies/3.3.0/ current
Enter fullscreen mode Exit fullscreen mode

And then check if everything works as expected:

$ ruby -v
ruby 3.3.0 (2023-12-25 revision 5124f9ac75) [x86_64-openbsd7.4]
Enter fullscreen mode Exit fullscreen mode

AWS Security LIVE!

Join us for AWS Security LIVE!

Discover the future of cloud security. Tune in live for trends, tips, and solutions from AWS and AWS Partners.

Learn More

Top comments (0)

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

👋 Kindness is contagious

Dive into an ocean of knowledge with this thought-provoking post, revered deeply within the supportive DEV Community. Developers of all levels are welcome to join and enhance our collective intelligence.

Saying a simple "thank you" can brighten someone's day. Share your gratitude in the comments below!

On DEV, sharing ideas eases our path and fortifies our community connections. Found this helpful? Sending a quick thanks to the author can be profoundly valued.

Okay