gpt4 book ai didi

ruby - rbenv exec bundle exec 而不仅仅是 bundle exec

转载 作者:数据小太阳 更新时间:2023-10-29 07:34:43 25 4
gpt4 key购买 nike

我正在尝试设置 rbenv:

https://github.com/sstephenson/rbenv#section_2

我有一个问题:我必须在一切之前使用 rbenv exec

所以现在我要做 bundle exec:

rbenv exec 捆绑执行

我该如何解决这个问题?

编辑

运行 rbenv rehash 后我得到:

$ ➔ rbenv rehash
$ ➔ rails s

bash: /usr/local/bin/rails: /usr/local/bin/ruby: bad interpreter: No such file or directory

最佳答案

真的很傻:

我忘记运行 exec $SHELL 所以我的 PATH 没有更新。最初的字符串:

export PATH="$HOME/.rbenv/bin:$PATH"
eval "$(rbenv init -)"

已放入 .bash_profile,但本应放入 .bashrc。解决这个问题后,我忘了重新打开/运行上面的命令!

感谢@Dylan Markov 在评论中为我指明了正确的方向:)

关于ruby - rbenv exec bundle exec 而不仅仅是 bundle exec,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9083058/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com