Linked List

A personal knowledge base


#Build Older Ruby on Arch Linux

Install openssl-1.0, then build ruby:

curl -fsSL | PKG_CONFIG_PATH=/usr/lib/openssl-1.0/pkgconfig RUBY_CFLAGS="-I/usr/include/openssl-1.0" RUBY_LDFLAGS="-L/usr/lib/openssl-1.0" rbenv install -v --patch 2.2.1

Sources: ruby-build and an Arch forum post.

#Run Specs That Have Been Modified

# shell
rspec `git ls-files -m \*_spec.rb`

#Run Specs Corresponding to a Particular Type

# shell
ag -lG _spec.rb$ . spec | grep course

In this example Type is, 'course'.

#Show Configure Arguments Ruby was Built With

# shell
ruby -r rbconfig -e 'puts RbConfig::CONFIG["configure_args"]'

Sample Output:

 '--prefix=/Users/wmoore/.rbenv/versions/2.1.5' '--with-openssl-dir=/usr/local/opt/openssl' '--with-readline-dir=/usr/local/opt/readline' 'CC=clang' 'CFLAGS= -O3 -Wno-error=shorten-64-to-32 ' 'LDFLAGS=-L/Users/wmoore/.rbenv/versions/2.1.5/lib ' 'CPPFLAGS=-I/Users/wmoore/.rbenv/versions/2.1.5/include '
Last modified: 29 April 2017