Skip to content

Instantly share code, notes, and snippets.

@kvutien
Created April 3, 2022 16:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kvutien/eee18d1a0f1e5cf616a36af939e3b59c to your computer and use it in GitHub Desktop.
Save kvutien/eee18d1a0f1e5cf616a36af939e3b59c to your computer and use it in GitHub Desktop.
Ruby script to check CPU used to compile Ruby
require 'rbconfig'
OSVERSION = RbConfig::CONFIG['host_os']
ARCH = RbConfig::CONFIG['arch']
HOSTCPU = RbConfig::CONFIG['host_cpu']
BUILDCPU = RbConfig::CONFIG['build_cpu']
TARGETCPU = RbConfig::CONFIG['target_cpu']
puts "OS: #{OSVERSION}"
puts "Arch: #{ARCH}"
puts "Host CPU: #{HOSTCPU}"
puts "Build CPU: #{BUILDCPU}"
puts "Target CPU: #{TARGETCPU}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment