Skip to content

Instantly share code, notes, and snippets.

@BuonOmo
Last active September 27, 2023 15:48
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 BuonOmo/1602c3fc050939ae4e40c1b91171036b to your computer and use it in GitHub Desktop.
Save BuonOmo/1602c3fc050939ae4e40c1b91171036b to your computer and use it in GitHub Desktop.
Ruby flags for compiling and running ruby in C
// See also https://silverhammermba.github.io/emberb/embed/
ruby-gcc-flags() {
[[ "$(rbenv version)" = "system" ]] && return 1
PKG_CONFIG_PATH="$PKG_CONFIG_PATH:$(rbenv prefix)/lib/pkgconfig" \
pkg-config --cflags --libs ruby-$(rbenv version | cut -d. -f1-2)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment