Install RVM
https://rvm.io/rvm/install/
Update RVM
rvm get stable
Install Ruby dependencies
rvm requirements
List known rubies
rvm list known
Install Ruby
rvm install 1.9.3 # Latest known patch level
rvm install 1.9.3 -j 3 # Parallel compile, set to # of CPU cores
rvm install 1.9.3 --patch falcon # Use a patch (falcon for performance)
rvm install 1.9.2-p318 # Patchlevel 318
rvm install rbx --1.9 # Rubinius with 1.9 mode set as default
List all rubies and gemsets
rvm list # List rubies only
rvm list gemsets # List rubies and gemsets
rvm gemset list # List gemsets for current ruby
Selecting Ruby for work
rvm system # For system ruby, with fallback to default
rvm use jruby # For current session only
rvm use --default 1.9.3 # For current and new sessions
rvm use --ruby-version rbx # For current session and this project
RVM will automatically use a ruby and gemset when you cd
to a project directory.
More help
- in your terminal:
rvm help
- https://rvm.io/
This solved compiling problems with openssl:
rvm install ruby-2.5.1 --with-openssl-dir=/usr/local/opt/openssl
or:
rvm --debug requirements ruby