ruby - 安装 Rspec 时遇到问题
问题描述
所以这是我第一次在这里提问,所以请多多包涵。在过去的几天里,我一直在尝试将 rspec 安装到我的系统上。在几个月前的一个介绍性项目之后,我熟悉了我的 Mac 安装了 ruby 的事实,它不会让我真正安装任何 gem,因为它会回复权限被拒绝通知。所以我从自制软件安装了 ruby 并开始了我的编码。现在我想按照我正在处理的演练安装 rspec,但系统不允许我这样做。我在网上查看过,我认为这是我的 PATH,甚至尝试多次更改它,但它不起作用。bash_profile
在某一时刻,即使我source
不止一次地读取文件,我的终端也不会读取我的全部内容。我已经更新到zsh
它'
export PATH="/usr/local/opt:${PATH}"
export PATH="/usr/bin:/bin:/sbin:/sbin"
PATH="/usr/local/Cellar/ruby/2.7.2/bin:${PATH}" export PATH
# Setting PATH for Python 3.7
# The original version is saved in .bash_profile.pysave
PATH="/Library/Frameworks/Python.framework/Versions/3.7/bin:${PATH}"
export PATH
# Setting PATH for Python 3.7
# The original version is saved in .bash_profile.pysave
PATH="/Library/Frameworks/Python.framework/Versions/3.7/bin:${PATH}"
export PATH
# added by Anaconda3 2019.10 installer
# >>> conda init >>>
# !! Contents within this block are managed by 'conda init' !!
__conda_setup="$(CONDA_REPORT_ERRORS=false '/Users/name/opt/anaconda3/bin/conda' shell.bash hook 2> /dev/null)"
if [ $? -eq 0 ]; then
\eval "$__conda_setup"
else
if [ -f "/Users/name/opt/anaconda3/etc/profile.d/conda.sh" ]; then
# . "/Users/name/opt/anaconda3/etc/profile.d/conda.sh" # commented out by conda initialize
CONDA_CHANGEPS1=false conda activate base
else
\export PATH="/Users/name/opt/anaconda3/bin:$PATH"
fi
fi
unset __conda_setup
# <<< conda init <<<
# >>> conda initialize >>>
# !! Contents within this block are managed by 'conda init' !!
__conda_setup="$('/Users/name/opt/anaconda3/bin/conda' 'shell.bash' 'hook' 2> /dev/null)"
if [ $? -eq 0 ]; then
eval "$__conda_setup"
else
if [ -f "/Users/name/opt/anaconda3/etc/profile.d/conda.sh" ]; then
. "/Users/name/opt/anaconda3/etc/profile.d/conda.sh"
else
export PATH="/Users/name/opt/anaconda3/bin:$PATH"
fi
fi
unset __conda_setup
# <<< conda initialize <<<
echo "Hello World"
export PATH="/usr/local/opt/ruby/bin:$PATH"
export PATH="/usr/local/bin:$PATH"
解决方案
推荐阅读
- postgresql - PLPGSQL 函数:在 ORDER BY 中使用输入参数
- ios - PHAsset 从一张专辑复制到另一张专辑
- python - Python - 我想通过空格将字符串拆分为字符串列表。但是,忽略字符串的某些部分很重要
- php - 转到垃圾邮件的 Cpanel 主机上的 PHP Mail() 函数
- r - 将组的一个值提取到新列
- python - 按多列分组并计算 True 或 False 的总和
- printing - 这种3D打印效果有名字吗?
- date - 谷歌电子表格我如何用脚本添加日期,但没有 hh:mm:ss
- c# - 警告针对比项目当前目标框架更高的框架
- numpy - 循环使用重复值的 numpy 的排序值