Skip to content

Commit 6302159

Browse files
Update Ruby installation guide for rbenv (#489)
* Remove rehash sub-command instruction Rehash command is automatically run after installing gems: https://github.com/rbenv/rbenv#rbenv-rehash * Update build environment dependencies https://github.com/rbenv/ruby-build/wiki#fedora * Replace .bashrc with .bash_profile As suggested for "other platforms" in the docs: https://github.com/rbenv/rbenv#basic-git-checkout * Add clarifying line for installing gems * Remove clarifying line for installing gems * Remove interpreter Co-authored-by: Jarek Prokop <[email protected]> * Add -l flag to exec $SHELL * Update tech/languages/ruby/ruby-installation.md Co-authored-by: Jarek Prokop <[email protected]> --------- Co-authored-by: Jarek Prokop <[email protected]>
1 parent 276b17a commit 6302159

File tree

1 file changed

+4
-10
lines changed

1 file changed

+4
-10
lines changed

tech/languages/ruby/ruby-installation.md

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ RUBYPICK=_mri_
5050
The first step is to install dependencies for Ruby.
5151

5252
```console
53-
$ sudo dnf install git-core zlib zlib-devel gcc-c++ patch readline readline-devel libyaml-devel libffi-devel openssl-devel make bzip2 autoconf automake libtool bison curl sqlite-devel perl-FindBin
53+
$ 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
5454
```
5555

5656
Then we are going to clone rbenv and the ruby-build rbenv plugin into the home directory.
@@ -59,13 +59,13 @@ To make rbenv command available we append your shell's rc file with initializati
5959
```console
6060
$ git clone https://github.com/rbenv/rbenv.git ~/.rbenv
6161
$ git clone https://github.com/rbenv/ruby-build.git ~/.rbenv/plugins/ruby-build
62-
$ echo 'eval "$(~/.rbenv/bin/rbenv init -)"' >> ~/.bashrc
62+
$ echo 'eval "$(~/.rbenv/bin/rbenv init -)"' >> ~/.bash_profile
6363
```
6464

6565
Next step we have to refresh the shell to make the binaries available. This can be achieved
6666
by either the following command or opening a new terminal:
6767
```console
68-
$ exec $SHELL
68+
$ exec $SHELL -l
6969
```
7070

7171
Now you can install Ruby simply via `rbenv install`
@@ -81,14 +81,8 @@ Use this command if you do not want rubygems to install the documentation for ea
8181
$ echo "gem: --no-document" > ~/.gemrc
8282
```
8383

84-
Install bundler
84+
Install bundler:
8585

8686
```console
8787
$ gem install bundler
8888
```
89-
90-
Whenever you install a new version of Ruby or a gem, you should run the rehash sub-command. This will make executables known to rbenv, which will allow us to run those executables:
91-
92-
```console
93-
$ rbenv rehash
94-
```

0 commit comments

Comments
 (0)