From dcfb172704f3afb68a30425029ec834be2883274 Mon Sep 17 00:00:00 2001 From: bt Date: Sat, 8 Jun 2024 13:22:19 -0400 Subject: More content porting, on-going markdown changes for lowdown support --- build/rvm/index.html | 47 ++++++++++++++++++++++++++++++----------------- 1 file changed, 30 insertions(+), 17 deletions(-) (limited to 'build/rvm/index.html') diff --git a/build/rvm/index.html b/build/rvm/index.html index 7af370f..63bbb98 100644 --- a/build/rvm/index.html +++ b/build/rvm/index.html @@ -1,41 +1,54 @@ - + Installing Ruby with RVM on Alpine Linux - - + + +
-

Installing Ruby with RVM on Alpine Linux

+

Installing Ruby with RVM on Alpine Linux

+

2023-03-16

-

For some on-going projects I need to switch to different versions of ruby. Although there exist many step-by-step instructions on installing and configuring rvm for most Linux distros, there aren't many focused on Alpine "daily drivers".

-

So this post is more or less a helpful document for my future self. If it happens to help others then that's an added bonus!

-

Simple Setup

+ +

For some on-going projects I need to switch to different versions of ruby. Although there exist many step-by-step instructions on installing and configuring rvm for most Linux distros, there aren’t many focused on Alpine “daily drivers”.

+ +

So this post is more or less a helpful document for my future self. If it happens to help others then that’s an added bonus!

+ +

Simple Setup

+

Make sure you have the basic packages first:

+
apk update
 apk add curl gcc gnupg gpg dirmngr procps musl-dev linux-headers zlib zlib-dev openssl openssl-dev libssl1.1
 
-

Next download the latest stable version of rvm from Github, unpack it, place it in the proper user directory (~/.rvm) and install any required libs:

-
curl -sSL https://github.com/rvm/rvm/tarball/stable -o rvm-stable.tar.gz
-echo 'export rvm_prefix="$HOME"' > ~/.rvmrc
-echo 'export rvm_path="$HOME/.rvm"' >> ~/.rvmrc
-mkdir rvm && cd rvm
-tar --strip-components=1 -xzf ../rvm-stable.tar.gz
-./install --auto-dotfiles --autolibs=0
+
+

Next download the latest stable version of rvm from Github, unpack it, place it in the proper user directory (~/.rvm) and install any required libs:

+ +
curl -sSL https://github.com/rvm/rvm/tarball/stable -o rvm-stable.tar.gz
+echo 'export rvm_prefix="$HOME"' > ~/.rvmrc
+echo 'export rvm_path="$HOME/.rvm"' >> ~/.rvmrc
+mkdir rvm && cd rvm
+tar --strip-components=1 -xzf ../rvm-stable.tar.gz
+./install --auto-dotfiles --autolibs=0
 
+

Now we can remove everything and properly link to rvm:

-
cd ../ && rm -rf rvm-stable stable.tar.gz rvm
-source ~/.rvm/scripts/rvm
+
+
cd ../ && rm -rf rvm-stable stable.tar.gz rvm
+source ~/.rvm/scripts/rvm
 
+

Now you can freely install any version of Ruby that you desire!

+
rvm install ruby-X.X.X