Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Windows setup guide: do not recommend to install rbenv via apt #457

Closed
HeavySnowJakarta opened this issue Feb 13, 2024 · 9 comments
Closed

Comments

@HeavySnowJakarta
Copy link

For Windows Dev Setup Guide, according to Installation of rbenv,

Note that the version of rbenv that is packaged and maintained in the Debian and Ubuntu repositories is out of date. To install the latest version, it is recommended to install rbenv using git.

So the wiki had better be edited.

@HeavySnowJakarta
Copy link
Author

HeavySnowJakarta commented Feb 13, 2024

By changing the content from sudo apt install rbenv to

Installing `rbenv` via `apt` is not recommended as the version provided by `apt` is too slow. Instead, you had better install it by cloning the Git repository.
\```bash
git clone https://github.com/rbenv/rbenv.git ~/.rbenv
\```

Let `rbenv` be automatically configured every time the system starts:
\```bash
echo 'eval "$(~/.rbenv/bin/rbenv init - bash)"' >> ~/.bashrc
\```

Then install the `ruby-build` plugin:
\```bash
git clone https://github.com/rbenv/ruby-build.git "$(rbenv root)"/plugins/ruby-build
\```

Then it'll be rbenv install 3.3.0 and the following things, by doing which version 3.3.0 is not available and similar confusing problems can be simply prevented.

I have no permission to edit the wiki myself.

@HeavySnowJakarta
Copy link
Author

THE SAME FOR Linux Setup Guide

@zachgoll
Copy link
Collaborator

zachgoll commented Feb 13, 2024

@HeavySnowJakarta did this command (mentioned in the Wiki) not work properly?

cd "$(rbenv root)"/plugins/ruby-build && git pull

After installing rbenv, that command should pull in ruby-build and make 3.3.0 available for install.

@HeavySnowJakarta
Copy link
Author

@HeavySnowJakarta did this command (mentioned in the Wiki) not work properly?

cd "$(rbenv root)"/plugins/ruby-build && git pull

After installing rbenv, that command should pull in ruby-build and make 3.3.0 available for install.

Not working for me. Confusingly ~/.rbenv/ is empty after apt install rbenv for me but rbenv is actually installed.

@zachgoll
Copy link
Collaborator

@HeavySnowJakarta did this command (mentioned in the Wiki) not work properly?

cd "$(rbenv root)"/plugins/ruby-build && git pull

After installing rbenv, that command should pull in ruby-build and make 3.3.0 available for install.

Not working for me. Confusingly ~/.rbenv/ is empty after apt install rbenv for me but rbenv is actually installed.

Which step are you failing at? Can you provide some detailed screenshots and/or terminal output?

@HeavySnowJakarta
Copy link
Author

When cd "$(rbenv root)"/plugins/ruby-build && git pull, it outputs ~/.rbenv/plugins/ruby-build: No such file or directory, actually the whole ~/.rbenv/ does not exist. I tried to clone ruby-build into ~/.rbenv/plugins, but it still can not find the proper version of Ruby at ~/.rbenv/bin because it does not exist at all.

@zachgoll
Copy link
Collaborator

@HeavySnowJakarta can you try installing with Git instead?

https://github.com/rbenv/rbenv?tab=readme-ov-file#basic-git-checkout

@djsiddz
Copy link

djsiddz commented Feb 14, 2024

When cd "$(rbenv root)"/plugins/ruby-build && git pull, it outputs ~/.rbenv/plugins/ruby-build: No such file or directory, actually the whole ~/.rbenv/ does not exist. I tried to clone ruby-build into ~/.rbenv/plugins, but it still can not find the proper version of Ruby at ~/.rbenv/bin because it does not exist at all.

I can confirm this behaviour. I just finished setting up maybe on my Windows WSL. I figured the ruby-build repo needs to exist at that path, so I created the folder plugins and cloned ruby-build there for the path to exist.

Then I got the updated list with rbenv install --list which allowed installing Ruby v3.3.0 and finish setting up maybe and have it running.

I think it makes sense to set up rbenv from their repo as suggested by @HeavySnowJakarta and rbenv themself and make the local setup smooth.

@zachgoll
Copy link
Collaborator

Great, I've updated the Wiki with the Git installation method:

https://github.com/maybe-finance/maybe/wiki/Windows-Dev-Setup-Guide

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants