DEV Community

kojix2
kojix2

Posted on

2

Fast multi-core installation of Ruby gems with C extensions

It's easy. Simply set the environment variable GNUMAKEFLAGS or MAKEFLAGS.

export GNUMAKEFLAGS=-j4
Enter fullscreen mode Exit fullscreen mode

Update locally installed gems.

MAKEFLAGS=-j8 gem update
Enter fullscreen mode Exit fullscreen mode

This technique can be applied to programming languages other than Ruby. For example, the R language library also uses the C++ extension, and these environment variables will speed up the installation.

Have a nice day!

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

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay