diff options
author | Bradley Taunt <bt@btxx.org> | 2024-05-25 16:14:03 -0400 |
---|---|---|
committer | Bradley Taunt <bt@btxx.org> | 2024-05-25 16:16:54 -0400 |
commit | e417a818e207a6cca6e2f3c471611673ab836a62 (patch) | |
tree | 664686a365c3d1e73349b5a667fa892f46445fef /_posts/2023-03-16-rvm.md |
Initial commit for Jekyll testing and conversion, updated
Diffstat (limited to '_posts/2023-03-16-rvm.md')
-rw-r--r-- | _posts/2023-03-16-rvm.md | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/_posts/2023-03-16-rvm.md b/_posts/2023-03-16-rvm.md new file mode 100644 index 0000000..3b914e2 --- /dev/null +++ b/_posts/2023-03-16-rvm.md @@ -0,0 +1,50 @@ +--- +layout: post +title: "Installing Ruby with RVM on Alpine Linux" +date: 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 + +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 + + +Now we can remove everything and properly link to `rvm`: + + + cd ../ && rm -rf rvm-stable stable.tar.gz rvm + source ~/.rvm/scripts/rvm + + +**Note**: If you plan to work with `bundler` be sure to do the following before installing ruby versions via `rvm`: + + + rvm pkg install openssl + rvm pkg install libyaml + + +Now you can freely install any version of Ruby that you desire! + + + rvm install ruby-X.X.X + |