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:
  • 689 Vote(s) - 3.51 Average
  • 1
  • 2
  • 3
  • 4
  • 5
rbenv not changing ruby version

#21
There a lot of of misleading answers that work. I thought it was worth mentioning the steps from the [`rbenv` README](

[To see links please register here]

).

1. `$ brew install rbenv`
2. `$ rbenv init` **and follow** the instructions it gives you. This is what I got:

```
~ $ rbenv init
# Load rbenv automatically by appending
# the following to ~/.bash_profile:

eval "$(rbenv init -)"
```

I updated my `~/.bash_profile`...

3. Close terminal and open it again
4. Verify it's working correctly by running:
```
$ curl -fsSL

[To see links please register here]

| bash
```
5. Now just install the version you want by doing: `rbenv install <version>`
Reply

#22
Linux / Ubuntu Users
Step 1:
```
$ rbenv versions
system
2.6.0
* 2.7.0 (set by /home/User/Documents/sample-app/.ruby-version) #Yours will be different
2.7.2

```

Step 2:
```
$ nano /home/User/Documents/sample-app/.ruby-version
```

Step 3:
```
$ ruby -v
ruby 2.7.2p137 (2020-10-01 revision 5445e04352) [x86_64-linux]
```
Reply

#23
Strangely, `rbenv` version did not set the `.rbenv` file.

Check with: `ls -ltra` --> to see that a `rbenv` was written.
Reply

#24
I came to the same problem.
Fixed this by run the `rbenv global` command with `sudo`.
I think it was something permission problem.

update:
I finally found the solution.
There was one same file "version" on my mac, which is under `/usr/local/Cellar/rbenv/0.3.0/`.
I think it was created by mistake occasionally. you should remove it.
Reply

#25
Adding eval "$(rbenv init -)" to the .bash_profile on my mac resolved this issue.
rbenv local <ruby-version>
ruby -v gave the set <ruby-version>
Reply

#26
Run this command

Add rbenv to bash so that it loads every time you open a terminal

echo 'if which rbenv > /dev/null; then eval "$(rbenv init -)"; fi' >> ~/.bash_profile
source ~/.bash_profile
this will solve your problem [Reference][1]


[1]:

[To see links please register here]

Reply

#27
I will suggest do not use rbenv has couple of issues.
1. it does not come with bundle version once you install ruby
2. most of time create bundler version pickup issue while running bundle install

To cut down this much effort,I would suggest to use rvm, make life easier.
follow this link to install rvm

[To see links please register here]

Reply

#28
[![enter image description here][1]][1]

Apparently, it worked for me when I used the **Rosetta** terminal

You can try doing the same thing using **Rosetta** terminal

by going into

Finder > Utilities > Terminal > Get Info

[1]:
Reply

#29
Adding the following to `.bashrc` works for me -

`export PATH="$HOME/.rbenv/shims:$PATH"`
Reply

#30
I had this issue when setting up Ruby using rbenv on **MacBook Pro Catalina OS** and **MacBook Pro Big Sur**.

Here's how I fixed:

First run the command below to initialize rbenv:

rbenv init

This will give you some instruction on what to do. Basically you will have to open the `~/.zshrc` file and add this to the file `eval "$(rbenv init -)"`. You can accomplish this by running the command below:

echo 'eval "$(rbenv init -)"' >> ~/.zshrc

Next, run the command below to set your Ruby version:

rbenv local <your-desired-ruby-version>

In my case, my desired Ruby version was 3.0.1, so it was:

rbenv local 3.0.1

When you are done, quit your terminal using **Command + Q**, and then open a new terminal, this time when you run the command:

ruby -v
rbenv versions

You will see that your desired Ruby version has already been set up for you.
Reply



Forum Jump:


Users browsing this thread:
1 Guest(s)

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