How do I find the directory chruby.sh and auto.sh files to finalize installation of chruby?

huangapple go评论58阅读模式
英文:

How do I find the directory chruby.sh and auto.sh files to finalize installation of chruby?

问题

抱歉提前道歉;我对所有这些都很陌生。

当我通过Homebrew下载chruby时,出现了一些“注意事项”,即“将以下内容添加到~/.bash_profile或~/.zshrc文件...”在按照这些说明之前,我关闭了终端,现在我不知道如何添加到这些文件(因为每个用户的目录似乎不同?)。我已经打开了我的主目录,可以看到隐藏文件,但不知道从哪里开始查找Caveats中提到的chruby.sh和auto.sh文件。

我该如何遵循Caveats并成功安装chruby?

谢谢,再次道歉。

英文:

I apologize in advance; I am new to all of this.

When I downloaded chruby via Homebrew, some "Caveats" came up, i.e., "Add the following to the ~/.bash_profile or ~/.zshrc file ..." I closed my Terminal before following these instructions and now I do not know how to add to these files (as it seems the directory is different for each user?). I've opened my home directory and can see hidden files, but I don't know where to begin to look to find the chruby.sh and auto.sh files mentioned in the Caveats.

How can I follow the Caveats and successfully install chruby?

Thank you and apologies again.

答案1

得分: 1

你可以通过运行以下命令来获取关于 chruby 的信息:

brew info chruby

你将获得你要查找的注意事项:

==> Caveats
将以下内容添加到 ~/.bash_profile 或 ~/.zshrc 文件中:
   source /opt/homebrew/opt/chruby/share/chruby/chruby.sh

要启用由 .ruby-version 文件指定的 Rubies 的自动切换功能,
请将以下内容添加到 ~/.bash_profile 或 ~/.zshrc 中:
   source /opt/homebrew/opt/chruby/share/chruby/auto.sh
英文:

You can obtain information about chruby by running:

brew info chruby

You will obtain the caveats you are looking for:

==> Caveats
Add the following to the ~/.bash_profile or ~/.zshrc file:
   source /opt/homebrew/opt/chruby/share/chruby/chruby.sh

To enable auto-switching of Rubies specified by .ruby-version files,
add the following to ~/.bash_profile or ~/.zshrc:
   source /opt/homebrew/opt/chruby/share/chruby/auto.sh

huangapple
  • 本文由 发表于 2023年4月11日 14:52:26
  • 转载请务必保留本文链接:https://go.coder-hub.com/75983130.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定