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

Homebrew setup instructions are incorrect #425

Closed
d4rky-pl opened this issue Jan 10, 2019 · 14 comments
Closed

Homebrew setup instructions are incorrect #425

d4rky-pl opened this issue Jan 10, 2019 · 14 comments

Comments

@d4rky-pl
Copy link

The setup instructions are incorrect - the Homebrew formula installs things a bit differently.
The paths (in case of Bash) are:

. /usr/local/opt/asdf/asdf.sh
. /usr/local/opt/asdf/etc/bash_completion.d/asdf.bash
@ttilberg
Copy link

I tried installing asdf for the first time tonight, and it did not work (as this issue suggests). I was digging into it on my system and left some notes for someone who is more fluent in brewing (and/or this project).

#428 (comment)

Hopefully this is helpful for someone.

@pikeas
Copy link

pikeas commented Jan 23, 2019

Same issue here, after running brew install asdf on Mojave 10.14.2, and before sourcing either script, running asdf outputs the following:

$ asdf
cat: /usr/local/VERSION: No such file or directory
version:

cat: /usr/local/help.txt: No such file or directory

@oscarteg
Copy link

oscarteg commented Feb 1, 2019

The issue @ttilberg linked to has helped me solve the same problem.

TLDR: put export ASDF_DIR=$(brew --prefix asdf) in your .bash_profile or .zshrc or whatever you are using.

@dboune
Copy link
Contributor

dboune commented Mar 13, 2019

Note: If a homebrew user already has bash completion configured for homebrew (see: configuring-completions-in-bash), or has properly installed the bash-completion or bash-completion@2 package, sourcing the completions manually is unnecessary.

@danhper
Copy link
Member

danhper commented Mar 24, 2019

Is this still an ongoing issue?
If so, could a brew user be kind enough to send a PR with working instructions, please?
Thank you very much!

@dboune
Copy link
Contributor

dboune commented Mar 24, 2019

@danhper The way the docs are structured focuses on installation via Git. If I were to update the docs for this purpose, I'd be inclined to also add tabs to the Install asdf-vm section with Homebrew specific installation instructions, so that the instructions in Add to your Shell have a bit more context available.

Installing via Git would naturally not require Homebrew specific instructions, whether or not Homebrew is used.

Thoughts?

@danhper
Copy link
Member

danhper commented Mar 24, 2019

@dboune I agree with this. I suppose installing via Homebrew is a common choice for macOS user so having a dedicated section is, I think, a good idea.
However, it seems that docsify does not support nested tabs so I am not sure what is the best way to present this cleanly.

@dboune
Copy link
Contributor

dboune commented Mar 24, 2019

@danhper - I had the same thought, and indeed, no nested tabs :(

The only thing I can think of to keep the structure and not start branching pages is to either refer to the previous section, or make the assumption that the user will pick the appropriate tab as they go along.

There is a realistic chance that someone could come along wanting macOS + Homebrew + ZSH or FISH for example, and be willing to add it to the docs, so keeping the tabs for install instructions makes sense.

@jthegedus
Copy link
Contributor

In Docsify, the first tab is the default selection, so in the Install asdf-vm section we could have two tabs, Git | Homebrew. I have been thinking of better ways to do this all than tabs, but requires a lot more work.

@dboune
Copy link
Contributor

dboune commented Mar 24, 2019

I’ll be happy to go ahead and submit a PR just with simple tabs for the Install and Shell sections that includes the Homebrew instructions making the general assumption that folks will figure out which tabs are applicable to them.

If that’s worth the effort, let me know and I’ll get it done.

@jthegedus
Copy link
Contributor

@dboune I think most people will be able to figure it out.

The ideal solution I ultimately want is to get select boxes for OS, Shell and Install Method, but that will require a lot more work with Docsify or an alternate tool.

@jthegedus
Copy link
Contributor

I'm in favour of fast iterations over perfection the first time. Feel free to ping me in subsequent PRs if there are immediate issues with this 😄

@humankindof
Copy link

https://asdf-vm.com/#/core-manage-asdf-vm

To make homebrew's completions available in bash, you must source the definitions as part of your shell startup. They have to be in your PATH.

For me, on a Mac, this simply means running each of these commands
echo -e '\n. $(brew --prefix asdf)/asdf.sh' >> ~/.bash_profile
echo -e '\n. $(brew --prefix asdf)/etc/bash_completion.d/asdf.bash' >> ~/.bash_profile

The second command is unnecessary if you have configured completions for Homebrew in ~/.bash_profile

Homebrew bash configuration completion code:
https://docs.brew.sh/Shell-Completion#configuring-completions-in-bash

asdf install instructions for each system here:
https://asdf-vm.com/#/core-manage-asdf-vm

@jthegedus
Copy link
Contributor

jthegedus commented Apr 22, 2020

As I said in #425 (comment)

The ideal solution I ultimately want is to get select boxes for OS, Shell and Install Method, but that will require a lot more work with Docsify or an alternate tool.

we have updated the docs (https://asdf-vm.com/#/core-manage-asdf-vm) with select boxes to choose your setup and get just the information for your setup. Hope this helps

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

No branches or pull requests

9 participants