When installing a gem with C extension in Ruby, I want to finish it quickly using multiple CPU cores like make -j4

At ruby-jp.slack.com

RubyでC拡張を使っているgemをインストールする際に、make -j4  みたいに複数のCPUのコアを使って早く終わらせたい時はどんなオプションをつければいいですか?

環境変数で設定した記憶があるけど忘れてしまった

export GNUMAKEFLAGS=-j4

So the correct answer is

export GNUMAKEFLAGS=-j4

is. According to the number of cores in your computer

GNUMAKEFLAGS=-j8 gem update

Please try. For gems that are using C extensions, the update may finish quickly.

That's all for this article.

Recommended Posts

When installing a gem with C extension in Ruby, I want to finish it quickly using multiple CPU cores like make -j4
I wrote a C parser (like) using PEG in Ruby
I want to select multiple items with a custom layout in Dialog
I want to download a file on the Internet using Ruby and save it locally (with caution)
I made a Ruby extension library in C
When making a personal app, I was wondering whether to make it using haml
If hash [: a] [: b] [: c] = 0 in Ruby, I want you to extend it recursively even if the key does not exist.
I want to find a relative path in a situation using Path
I want to make a list with kotlin and java!
I want to make a function with kotlin and java!
I searched for a web framework with Gem in Ruby
Even in Java, I want to output true with a == 1 && a == 2 && a == 3
I want to create a Parquet file even in Ruby
I want to make a button with a line break with link_to [Note]
I want to add a browsing function with ruby on rails
I tried to write code like a type declaration in Ruby
[Ruby] I want to put an array in a variable. I want to convert to an array
What I don't like when using interface of a function with default arguments in Kotlin from Java
I tried to make a parent class of a value object in Ruby
[iOS] I tried to make a processing application like Instagram with Swift
[Note] I want to get in reverse order using afterLast with JdbcTemplate
I want to display a PDF in Chinese (Korean) with thin reports
I tried to make full use of the CPU core in Ruby
I tried to make a talk application in Java using AI "A3RT"
If you want to make a zip file with Ruby, it's rubyzip.
I want to ForEach an array with a Lambda expression in Java
[Ruby] I want to make an array from a character string with the split method. And vice versa.
Let's create a TODO application in Java 2 I want to create a template with Spring Initializr and make a Hello world
Created a native extension of Ruby with Rust and published it as a gem
Even in Java, I want to output true with a == 1 && a == 2 && a == 3 (Javassist second decoction)
I want to be able to read a file using refile with administrate [rails6]
Rails6 I want to make an array of values with a check box
When I tried to use a Wacom tablet with ubuntu 20.04, I didn't recognize it.
Even in Java, I want to output true with a == 1 && a == 2 && a == 3 (black magic edition)
[Ruby] When you want to assign the result obtained by conditional branching to a variable and put it in the argument