Create an account

Very important

  • To access the important data of the forums, you must be active in each forum and especially in the leaks and database leaks section, send data and after sending the data and activity, data and important content will be opened and visible for you.
  • You will only see chat messages from people who are at or below your level.
  • More than 500,000 database leaks and millions of account leaks are waiting for you, so access and view with more activity.
  • Many important data are inactive and inaccessible for you, so open them with activity. (This will be done automatically)


Thread Rating:
  • 700 Vote(s) - 3.49 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to update Ruby with Homebrew?

#1
I want to know how to update to the latest **stable** version of Ruby with Homebrew. I am **not** interested in using RVM. Thanks.
Reply

#2
I followed [@spickermann's instructions here][1], but I was still running into trouble with the Mac System Ruby install being primary (`ruby -v` did not show my newly installed `global` ruby). I solved it by executing three more steps:

1. ```
rbenv init
```
2. Following the instructions which appeared in the console. For me, using `.zshrc`:
```
# Load rbenv automatically by appending
# the following to ~/.zshrc:
eval "$(rbenv init - zsh)"
```
Yours may be different if you use `.bashrc` or `.bash_profile`, instead of `.zshrc` - in all circumstances, you [should be able to change the `eval` statment][2] to
```
eval "$(rbenv init -)"
```
and have it work equivalently.

3. Start a new terminal (or re-source your `rc` file). For me, using `.zshrc`:
```
source ~/.zshrc
```

After following those steps, `ruby -v` showed the desired version of Ruby and not the system-installed version.

----------


[1]:

[To see links please register here]

[2]:

[To see links please register here]

Reply

#3
I would use [`ruby-build`](

[To see links please register here]

) with `rbenv`. The following lines install Ruby 3.2.2 and set it as your default Ruby version:

$ brew update
$ brew install ruby-build
$ brew install rbenv

$ rbenv install 3.2.2
$ rbenv global 3.2.2
Reply

#4
open terminal

`\curl -sSL

[To see links please register here]

| bash -s stable`

restart terminal then

rvm install ruby-2.4.2

check ruby version it should be 2.4.2
Reply

#5
To upgrade Ruby with rbenv: Per the [rbenv README](

[To see links please register here]

)

- Update first: `brew upgrade rbenv ruby-build`
- See list of Ruby versions: versions available: `rbenv install -l`
- Install: `rbenv install <selected version>`
Reply

#6
Adding to the selected answer (as I haven't enough rep to add comment), one way to see the list of available versions ([from ref][1]) try:

$ rbenv install -l

[1]:

[To see links please register here]

Reply

#7
`brew upgrade ruby`

Should pull latest version of the package and install it.

`brew update` updates brew itself, not packages _(formulas they call it)_
Reply



Forum Jump:


Users browsing this thread:
1 Guest(s)

©0Day  2016 - 2023 | All Rights Reserved.  Made with    for the community. Connected through