How to Install ROR
-
2. Installing Dependencies
Before installing Rbenv, ensure you have the necessary dependencies. To do so, run the following command:
sudo dnf install @development-tools git curl libffi-devel libyaml-devel
-
3. Installing Rbenv
Now, let’s install Rbenv on Fedora. Follow these steps:
git clone https://github.com/rbenv/rbenv.git ~/.rbenv
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bashrc
echo 'eval "$(rbenv init -)"' >> ~/.bashrc
exec $SHELL
-
4. Installing Rbenv-build
Next, install Rbenv-build on Fedora. Rbenv-build is an Rbenv plugin that facilitates the installation of different versions of Ruby. Execute the following commands:
git clone https://github.com/rbenv/ruby-build.git ~/.rbenv/plugins/ruby-build
echo 'export PATH="$HOME/.rbenv/plugins/ruby-build/bin:$PATH"' >> ~/.bashrc
exec $SHELL
-
5. Installing Ruby
Now, let’s install Ruby on Fedora. First, check for the available versions:
rbenv install -l
Choose the desired version and install it:
rbenv install 3.1.2
Set the installed version as the global default:
rbenv global 3.1.2
To view all installed versions:
rbenv versions
-
6. Installing Ruby on Rails (ROR)
Finally, let’s install Ruby on Rails on Fedora. For the latest version, execute:
gem install rails
Or specify a particular version:
gem install rails -v 7.0.4
Finally, Enjoy Ruby on Rails Development on Fedora ;)
Contents