diff options
author | Bradley Taunt <brad@serpapi.com> | 2024-06-13 14:57:38 -0400 |
---|---|---|
committer | Bradley Taunt <brad@serpapi.com> | 2024-06-13 14:57:38 -0400 |
commit | 26c7db12364e8eba08e2f8e85bb534ed735a0be8 (patch) | |
tree | 0e1d2f6e2456ca2266993eef72881057ee5b3dd9 /_posts/2024-06-02-Building_rbenv_on_OpenBSD_7.5.md | |
parent | a134c38317e808d6535af990cc505dab1bc7bbfe (diff) |
Major overhaul and cleanups
Diffstat (limited to '_posts/2024-06-02-Building_rbenv_on_OpenBSD_7.5.md')
-rw-r--r-- | _posts/2024-06-02-Building_rbenv_on_OpenBSD_7.5.md | 30 |
1 files changed, 21 insertions, 9 deletions
diff --git a/_posts/2024-06-02-Building_rbenv_on_OpenBSD_7.5.md b/_posts/2024-06-02-Building_rbenv_on_OpenBSD_7.5.md index 08774af..1e6a9fb 100644 --- a/_posts/2024-06-02-Building_rbenv_on_OpenBSD_7.5.md +++ b/_posts/2024-06-02-Building_rbenv_on_OpenBSD_7.5.md @@ -17,33 +17,45 @@ First, be sure to install the required packages in order to build from source, a Add `rbenv` to your PATH and initialize it (place this inside your `.bashrc` or `.zshrc` etc): - export PATH="$HOME/.rbenv/bin:$PATH" - export PATH="$HOME/.rbenv/shims:$PATH" - export RUBY_CONFIGURE_OPTS="--with-openssl-dir=/usr/local" - eval "$(rbenv init -)" +```sh +export PATH="$HOME/.rbenv/bin:$PATH" +export PATH="$HOME/.rbenv/shims:$PATH" +export RUBY_CONFIGURE_OPTS="--with-openssl-dir=/usr/local" +eval "$(rbenv init -)" +``` Then reload your shell (zsh in this example): - source ~/.zshrc +```sh +source ~/.zshrc +``` Next we will need to install `ruby-build` as a `rbenv` plugin. Clone the ruby-build repository into the rbenv plugins directory: - git clone https://github.com/rbenv/ruby-build.git ~/.rbenv/plugins/ruby-build +```sh +git clone https://github.com/rbenv/ruby-build.git ~/.rbenv/plugins/ruby-build +``` ## Installing Ruby and Setting Our Version Now use `rbenv` to install the desired version of Ruby (we will get an older version for this example): - rbenv install 3.3.0 +```sh +rbenv install 3.3.0 +``` If you run into issues, you may need to specify your openssl directory: - RUBY_CONFIGURE_OPTS="--with-openssl-dir=/usr/local" rbenv install 3.3.0 +```sh +RUBY_CONFIGURE_OPTS="--with-openssl-dir=/usr/local" rbenv install 3.3.0 +``` If you're on a slower machine (like mine) this might take a little bit. Just grab a coffee or a snack while you wait! Then navigate to your project of choice and set the `local` Ruby version: - rbenv local 3.3.0 +```sh +rbenv local 3.3.0 +``` That's it! If you'd prefer to set this version of Ruby for all projects going forward, simply replace `local` with `global`. |