From 05b90c0360d58dee216e2884a19d5daa377405ff Mon Sep 17 00:00:00 2001 From: dkudwalli Date: Wed, 17 Jun 2026 11:13:29 +0530 Subject: [PATCH 1/6] Fix typo in Ruby on Rails installation instructions --- tech/languages/ruby/ror-installation.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tech/languages/ruby/ror-installation.md b/tech/languages/ruby/ror-installation.md index 59619001..f155aba5 100644 --- a/tech/languages/ruby/ror-installation.md +++ b/tech/languages/ruby/ror-installation.md @@ -11,7 +11,7 @@ order: 4 To install Ruby on Rails on Fedora as a gem, install Ruby first together with `ruby-devel`, `gcc`, `zlib-devel` packages, and then install Rails using the `gem` command: ``` -$ sudo dnf group install "C Development Tools and Libraries" +$ sudo dnf group install c-development $ sudo dnf install ruby-devel zlib-devel $ gem install rails ``` From f962b81f8c7ff052eff5bb70f7cccbc8ca8f43ba Mon Sep 17 00:00:00 2001 From: dkudwalli Date: Wed, 17 Jun 2026 11:16:14 +0530 Subject: [PATCH 2/6] Revise Ruby installation guide with rbenv updates Updated installation instructions for Ruby with rbenv, including dependency installation and configuration steps. Added notes on rbenv rehash and bundler installation. --- tech/languages/ruby/ruby-installation.md | 48 +++++++++++++++--------- 1 file changed, 31 insertions(+), 17 deletions(-) diff --git a/tech/languages/ruby/ruby-installation.md b/tech/languages/ruby/ruby-installation.md index fb87e914..9a6a7c3a 100644 --- a/tech/languages/ruby/ruby-installation.md +++ b/tech/languages/ruby/ruby-installation.md @@ -45,42 +45,56 @@ RUBYPICK=_mri_ [Read more about RubyPick](https://github.com/fedora-ruby/rubypick). -## Installing Ruby with rbenv +# Installing Ruby with rbenv -The first step is to install dependencies for Ruby. +The first step is to install dependencies for Ruby and rbenv. ```console -$ sudo dnf install -y git-core gcc rust patch make bzip2 openssl-devel libyaml-devel libffi-devel readline-devel zlib-devel gdbm-devel ncurses-devel perl-FindBin perl-lib perl-File-Compare +$ sudo dnf install git-core zlib zlib-devel gcc-c++ patch readline-devel libyaml-devel libffi-devel openssl-devel make bzip2 autoconf automake libtool bison libcurl-devel sqlite-devel perl-FindBin perl-lib perl-File-Compare ``` -Then we are going to clone rbenv and the ruby-build rbenv plugin into the home directory. -To make rbenv command available we append your shell's rc file with initialization. - +To use Fedora packaged rbenv also install: ```console -$ git clone https://github.com/rbenv/rbenv.git ~/.rbenv -$ git clone https://github.com/rbenv/ruby-build.git ~/.rbenv/plugins/ruby-build -$ echo 'eval "$(~/.rbenv/bin/rbenv init -)"' >> ~/.bash_profile +$ sudo dnf install rbenv ruby-build-rbenv ``` -Next step we have to refresh the shell to make the binaries available. This can be achieved -by either the following command or opening a new terminal: +To use upstream rbenv, follow the steps in [Installing Ruby with +rbenv](/tech/languages/ruby/ruby-installation.html#installing-ruby-with-rbenv). + +Then configure your shell to enable rbenv: + ```console -$ exec $SHELL -l +$ echo 'eval "$(rbenv init -)"' >> ~/.bashrc +$ source ~/.bashrc ``` -Now you can install Ruby simply via `rbenv install` +Install a Ruby version, such as 3.1.2. See `rbenv install --list` for available versions. + ```console -$ rbenv install 3.0.4 -$ rbenv global 3.0.4 +$ rbenv install 3.1.2 +$ rbenv global 3.1.2 $ ruby -v ``` - Use this command if you do not want rubygems to install the documentation for each package locally. ```console -$ echo "gem: --no-document" > ~/.gemrc +$ echo "gem: --no-ri --no-rdoc" > ~/.gemrc ``` +## Rbenv rehash + +`rbenv rehash` is not needed when installing gems via `gem install` as rbenv will automatically +trigger the rehash. You may need to trigger a rehash manually after installing gems using bundler. +You can do so by running +```console +$ rbenv rehash +``` + +Since [rbenv commit 325abac](https://github.com/rbenv/rbenv/commit/325abac17de79a230152bb7038126a0641c6aa64), +there is no need to run `rbenv rehash` when installing gems via bundler or `gem install`. +Rbenv will automatically trigger the rehash using either of those methods. To ensure you have this +version installed, follow the [basic git checkout installation instructions](https://github.com/rbenv/rbenv?tab=readme-ov-file#basic-git-checkout). + Install bundler: ```console From e7b1721d4733f7f3b755a6547bf427725a238fd6 Mon Sep 17 00:00:00 2001 From: dkudwalli Date: Wed, 17 Jun 2026 11:17:12 +0530 Subject: [PATCH 3/6] Add bundler installation instructions Added instructions for installing bundler in Ruby. --- tech/languages/ruby/ruby-installation.md | 1 + 1 file changed, 1 insertion(+) diff --git a/tech/languages/ruby/ruby-installation.md b/tech/languages/ruby/ruby-installation.md index 9a6a7c3a..b0b3a814 100644 --- a/tech/languages/ruby/ruby-installation.md +++ b/tech/languages/ruby/ruby-installation.md @@ -95,6 +95,7 @@ there is no need to run `rbenv rehash` when installing gems via bundler or `gem Rbenv will automatically trigger the rehash using either of those methods. To ensure you have this version installed, follow the [basic git checkout installation instructions](https://github.com/rbenv/rbenv?tab=readme-ov-file#basic-git-checkout). + Install bundler: ```console From b37b5aa264b3857ad6e7af941fce5ddbb588a35d Mon Sep 17 00:00:00 2001 From: dkudwalli Date: Wed, 17 Jun 2026 11:25:19 +0530 Subject: [PATCH 4/6] Update headers in ruby-installation.md for clarity --- tech/languages/ruby/ruby-installation.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tech/languages/ruby/ruby-installation.md b/tech/languages/ruby/ruby-installation.md index b0b3a814..9eaaf884 100644 --- a/tech/languages/ruby/ruby-installation.md +++ b/tech/languages/ruby/ruby-installation.md @@ -45,7 +45,7 @@ RUBYPICK=_mri_ [Read more about RubyPick](https://github.com/fedora-ruby/rubypick). -# Installing Ruby with rbenv +## Installing Ruby with rbenv The first step is to install dependencies for Ruby and rbenv. @@ -81,7 +81,7 @@ Use this command if you do not want rubygems to install the documentation for ea $ echo "gem: --no-ri --no-rdoc" > ~/.gemrc ``` -## Rbenv rehash +### Rbenv rehash `rbenv rehash` is not needed when installing gems via `gem install` as rbenv will automatically trigger the rehash. You may need to trigger a rehash manually after installing gems using bundler. From 8fdc2c06e85ff06f5c032ee3e60b76acbf967ca7 Mon Sep 17 00:00:00 2001 From: dkudwalli Date: Wed, 17 Jun 2026 11:27:24 +0530 Subject: [PATCH 5/6] Fix C development tools installation command for Fedora Updated the command for installing C development tools on Fedora. --- tech/languages/ruby/gems-installation.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tech/languages/ruby/gems-installation.md b/tech/languages/ruby/gems-installation.md index 5066978d..d7a49024 100644 --- a/tech/languages/ruby/gems-installation.md +++ b/tech/languages/ruby/gems-installation.md @@ -19,7 +19,7 @@ $ sudo dnf install ruby-devel In case you lack the C compiler on your Fedora, you can install C development tools group: ``` -$ sudo dnf group install "C Development Tools and Libraries" +$ sudo dnf group install c-development ``` Other missing header files will depend on the particular gem you want to install. In Fedora the sub-packages containing header files are always suffixed with `-devel` so for example to install the `pg` gem, you will need to compile its C extensions against PostgreSQL header files that can be installed by installing `postgresql-devel` sub-package. From 5b5dddb0de6ad87d24db39da9be7333e6a5e7846 Mon Sep 17 00:00:00 2001 From: dkudwalli Date: Wed, 17 Jun 2026 11:29:11 +0530 Subject: [PATCH 6/6] Update Ruby version from 3.1.2 to 3.4.9 --- tech/languages/ruby/ruby-installation.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tech/languages/ruby/ruby-installation.md b/tech/languages/ruby/ruby-installation.md index 9eaaf884..8bbce6ae 100644 --- a/tech/languages/ruby/ruby-installation.md +++ b/tech/languages/ruby/ruby-installation.md @@ -68,11 +68,11 @@ $ echo 'eval "$(rbenv init -)"' >> ~/.bashrc $ source ~/.bashrc ``` -Install a Ruby version, such as 3.1.2. See `rbenv install --list` for available versions. +Install a Ruby version, such as 3.4.9. See `rbenv install --list` for available versions. ```console -$ rbenv install 3.1.2 -$ rbenv global 3.1.2 +$ rbenv install 3.4.9 +$ rbenv global 3.4.9 $ ruby -v ``` Use this command if you do not want rubygems to install the documentation for each package locally.